Partilhar via


PollResult.Error Class

  • java.lang.Object
    • com.azure.core.management.polling.PollResult.Error

public static class PollResult.Error

Type represents the error that poll-operation received from the service.

Constructor Summary

Constructor Description
Error(String message, int responseStatusCode, HttpHeaders responseHeaders, String responseBody)

Creates Error.

Method Summary

Modifier and Type Method and Description
String getMessage()

Gets the error message.

String getResponseBody()

Gets the response body associated with the error.

HttpHeaders getResponseHeaders()

Gets the response headers associated with the error.

int getResponseStatusCode()

Gets the response status code associated with the error.

Methods inherited from java.lang.Object

Constructor Details

Error

public Error(String message, int responseStatusCode, HttpHeaders responseHeaders, String responseBody)

Creates Error.

Parameters:

message - the error message
responseStatusCode - the http status code associated with the error
responseHeaders - the http response headers associated with the error
responseBody - the http response body associated with the error

Method Details

getMessage

public String getMessage()

Gets the error message.

Returns:

the error message

getResponseBody

public String getResponseBody()

Gets the response body associated with the error.

Returns:

the response body associated with the error

getResponseHeaders

public HttpHeaders getResponseHeaders()

Gets the response headers associated with the error.

Returns:

the response headers associated with the error

getResponseStatusCode

public int getResponseStatusCode()

Gets the response status code associated with the error.

Returns:

the response status code associated with the error

Applies to