Class ApiErrorException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.azure.core.exception.AzureException
com.azure.core.exception.HttpResponseException
com.azure.core.management.exception.ManagementException
com.azure.resourcemanager.compute.models.ApiErrorException
All Implemented Interfaces:
Serializable

public final class ApiErrorException extends com.azure.core.management.exception.ManagementException
Exception thrown for an invalid response with ApiError information.
See Also:
  • Constructor Details

    • ApiErrorException

      public ApiErrorException(String message, com.azure.core.http.HttpResponse response)
      Initializes a new instance of the ApiErrorException class.
      Parameters:
      message - the exception message or the response content if a message is not available.
      response - the HTTP response.
    • ApiErrorException

      public ApiErrorException(String message, com.azure.core.http.HttpResponse response, ApiError value)
      Initializes a new instance of the ApiErrorException class.
      Parameters:
      message - the exception message or the response content if a message is not available.
      response - the HTTP response.
      value - the deserialized response value.
  • Method Details

    • getValue

      public ApiError getValue()
      Gets the deserialized HTTP response value.
      Overrides:
      getValue in class com.azure.core.management.exception.ManagementException
      Returns:
      The deserialized HTTP response value.