-
Notifications
You must be signed in to change notification settings - Fork 35
Description
What is the current behavior?
Calling DeleteKey
using the ManageClient
takes an excessive amount of time (8+ seconds) to return when the specified key has already been deleted. We have a custom timeout set to 8 seconds, and this call consistently exceeds it when the key does not exist.
Steps to reproduce
- Use version 4.4.1 of the Deepgram .NET SDK.
- Attempt to delete a key via
ManageClient.DeleteKey(...)
where the key has already been deleted or does not exist. - Observe that the operation "hangs" and eventually times out/returns an actual DeppgramRESTException after a very long time.
Expected behavior
The SDK should fail fast or return promptly with a suitable error/response if the key is already deleted or not found, rather than hanging for several seconds.
Please tell us about your environment
- Operating System/Version: All common ones (Windows, MacOS and Linux)
- .NET Version: .NET 7.0 (we're unable to upgrade to .NET 8.0 at this time)
- Deepgram SDK Version: 4.4.1
Other information
Our current workaround is to call GetKey
before invoking DeleteKey
to ensure the key hasn't already been removed by another thread/process/service. This extra step avoids triggering our timeout handler, but it introduces unnecessary overhead and complexity. Ideally, DeleteKey
should return more promptly if the key is already absent. We are EU-based but all other calls consistently takes around 1-2 seconds RTT, only this one is really slow.