azure-sdk-for-java: Exception hierarchy

Python has defined an exception hierarchy in the following form:

AzureError
  |- AzureLibraryError
      |- AzureLibraryRequestError
      |- AzureLibraryResponseError
  |- ServiceRequestError
      |- ConnectionTimeoutError
      |- ServiceHttpRequestError
          |- ClientRequestError
              |- ResourceExistsError
              |- ClientAuthenticationError
              |- ResourceModifiedError
          |- ServerError
          |- TooManyRedirectsError
          |- TooManyRetriesError

We need to develop a similar exception hierarchy that is idiomatic for Java developers.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Todo:

  • Create a new package in azure-common com.azure.common.exception
  • We should repurpose the existing RestException class into ServiceRequestException, and relocate it into this package.
  • We build out the additional exception types and ensure that they are tested,
  • Ensure that Reactor properly propagates unchecked exceptions from the http pipeline through to the end user.