ResponseError Class
- java.
lang. Object - com.
azure. core. models. ResponseError
- com.
Implements
public final class ResponseError
implements JsonSerializable<ResponseError>
Represents the error details of an HTTP response.
This class encapsulates the details of an HTTP error response, including the error code, message, target, inner error, and additional error details. It provides methods to access these properties.
This class also provides a toJson(JsonWriter jsonWriter) method to serialize the error details to JSON, and a fromJson(JsonReader jsonReader) method to deserialize the error details from JSON.
Constructor Summary
Constructor | Description |
---|---|
ResponseError(String code, String message) |
Creates an instance of ResponseError. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Response |
fromJson(JsonReader jsonReader)
Reads a JSON stream into a ResponseError. |
String |
getCode()
Returns the error code of this error. |
String |
getMessage()
Returns the error message of this error. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
ResponseError
public ResponseError(String code, String message)
Creates an instance of ResponseError.
Parameters:
Method Details
fromJson
public static ResponseError fromJson(JsonReader jsonReader)
Reads a JSON stream into a ResponseError.
Parameters:
Returns:
Throws:
getCode
public String getCode()
Returns the error code of this error.
Returns:
getMessage
public String getMessage()
Returns the error message of this error.
Returns: