ManagementError Class

  • java.lang.Object
    • com.azure.core.management.exception.ManagementError

Implements

public class ManagementError
implements JsonSerializable<ManagementError>

An instance of this class provides additional information about an http error response.

Constructor Summary

Constructor Description
ManagementError()

Constructs a new ManagementError object.

ManagementError(String code, String message)

Constructs a new ManagementError object.

Method Summary

Modifier and Type Method and Description
static ManagementError fromJson(JsonReader jsonReader)

Reads a JSON stream into a ManagementError.

List<AdditionalInfo> getAdditionalInfo()

Gets the additional info for the error.

String getCode()

Gets the error code parsed from the body of the http error response.

List<> getDetails()

Gets the details for the error.

String getMessage()

Gets the error message.

String getTarget()

Gets the target of the error.

JsonWriter toJson(JsonWriter jsonWriter)
String toString()

Methods inherited from java.lang.Object

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

fromJson

public static ManagementError fromJson(JsonReader jsonReader)

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.

getAdditionalInfo

public List getAdditionalInfo()

Gets the additional info for the error.

Returns:

the additional info for the error.

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.

getDetails

public List getDetails()

Gets the details for the error.

Returns:

the details for the error.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

toString

public String toString()

Overrides:

ManagementError.toString()

Applies to