exceptions Module

Classes

AzureError

Base exception for all errors.

ClientAuthenticationError

An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.

DecodeError

Error raised during response deserialization.

DeserializationError

Raised if an error is encountered during deserialization.

HttpResponseError

A request was made, and a non-success status code was received from the service.

ODataV4Error

An HTTP response error where the JSON is decoded as OData V4 error format.

http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091

ODataV4Format

Class to describe OData V4 error format.

http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091

Example of JSON:


   {
       "error": {
           "code": "ValidationError",
           "message": "One or more fields contain incorrect values: ",
           "details": [
               {
                   "code": "ValidationError",
                   "target": "representation",
                   "message": "Parsing error(s): String '' does not match regex pattern '^[^{}/ :]+(?: :\\d+)?$'.
                   Path 'host', line 1, position 297."
               },
               {
                   "code": "ValidationError",
                   "target": "representation",
                   "message": "Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specificate
                   https: //github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
                   (schema https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."
               }
           ]
       }
   }
ResourceExistsError

An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.

ResourceModifiedError

An error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.

ResourceNotFoundError

An error response, typically triggered by a 412 response (for update) or 404 (for get/post)

ResourceNotModifiedError

An error response with status code 304. This will not be raised directly by the Azure core pipeline.

ResponseNotReadError

Error thrown if you try to access a response's content without reading first.

It is thrown if you try to access an ~azure.core.rest.HttpResponse or ~azure.core.rest.AsyncHttpResponse's content without first reading the response's bytes in first.

SerializationError

Raised if an error is encountered during serialization.

ServiceRequestError

An error occurred while attempt to make a request to the service. No request was sent.

ServiceResponseError

The request was sent, but the client failed to understand the response. The connection may have timed out. These errors can be retried for idempotent or safe operations

StreamClosedError

Error thrown if you try to access the stream of a response once closed.

It is thrown if you try to read / stream an ~azure.core.rest.HttpResponse or ~azure.core.rest.AsyncHttpResponse once the response's stream has been closed.

StreamConsumedError

Error thrown if you try to access the stream of a response once consumed.

It is thrown if you try to read / stream an ~azure.core.rest.HttpResponse or ~azure.core.rest.AsyncHttpResponse once the response's stream has been consumed.

TooManyRedirectsError

Reached the maximum number of redirect attempts.