Skip to content

Exception could be improved for request rate exceeded on a cosmosdb backed table #41

@johlrich

Description

@johlrich

If you hit your provisioned RU/s rate limit you'll currently get the following message:

An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll: 'One or more errors occurred.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 Microsoft.WindowsAzure.Storage.StorageException : Element 0 in the batch returned an unexpected response code.

The exception has HttpStatusCode set to 429 it could be used to instead throw a nicer exception about rate limits + suggesting a retry.

The only bummer is that I don't see a way using the StorageException to get at the http response header x-ms-retry-after-ms which contains how long you must wait unless I'm missing something. Could still be better to have something explicit even with that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions