Class ManagementError

java.lang.Object
com.azure.core.management.exception.ManagementError
All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagementError>

public class ManagementError extends Object implements com.azure.json.JsonSerializable<ManagementError>
An instance of this class provides additional information about an http error response.
  • Constructor Details

    • ManagementError

      public ManagementError()
      Constructs a new ManagementError object.
    • ManagementError

      public ManagementError(String code, String message)
      Constructs a new ManagementError object.
      Parameters:
      code - the error code.
      message - the error message.
  • Method Details

    • getCode

      public String getCode()
      Gets the error code parsed from the body of the http error response.
      Returns:
      the error code parsed from the body of the http error response.
    • getMessage

      public String getMessage()
      Gets the error message.
      Returns:
      the error message.
    • getTarget

      public String getTarget()
      Gets the target of the error.
      Returns:
      the target of the error.
    • getDetails

      public List<? extends ManagementError> getDetails()
      Gets the details for the error.
      Returns:
      the details for the error.
    • getAdditionalInfo

      public List<AdditionalInfo> getAdditionalInfo()
      Gets the additional info for the error.
      Returns:
      the additional info for the error.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ManagementError>
      Throws:
      IOException
    • fromJson

      public static ManagementError fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads a JSON stream into a ManagementError.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      The ManagementError that the JSON stream represented, or null if it pointed to JSON null.
      Throws:
      IOException - If a ManagementError fails to be read from the jsonReader.