public final class FacebookRequestError
extends java.lang.Object
implements android.os.Parcelable
getCategory()
to determine the type
of error that occurred, and act accordingly. For more information on error
handling, see
https://developers.facebook.com/docs/reference/api/errors/Modifier and Type | Class and Description |
---|---|
static class |
FacebookRequestError.Category
An enum that represents the Facebook SDK classification for the error that occurred.
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<FacebookRequestError> |
CREATOR |
static int |
INVALID_ERROR_CODE
Represents an invalid or unknown error code from the server.
|
static int |
INVALID_HTTP_STATUS_CODE
Indicates that there was no valid HTTP status code returned, indicating
that either the error occurred locally, before the request was sent, or
that something went wrong with the HTTP connection.
|
Constructor and Description |
---|
FacebookRequestError(int errorCode,
java.lang.String errorType,
java.lang.String errorMessage) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
java.lang.Object |
getBatchRequestResult()
Returns the full JSON response for the batch request.
|
FacebookRequestError.Category |
getCategory()
Returns the category in which the error belongs.
|
java.net.HttpURLConnection |
getConnection()
Returns the HTTP connection that was used to make the request.
|
int |
getErrorCode()
Returns the error code returned from Facebook.
|
java.lang.String |
getErrorMessage()
Returns the error message returned from Facebook.
|
java.lang.String |
getErrorRecoveryMessage()
Returns the message that can be displayed to the user before attempting error recovery.
|
java.lang.String |
getErrorType()
Returns the type of error as a raw string.
|
java.lang.String |
getErrorUserMessage()
Returns a message suitable for display to the user, describing a user action necessary to
enable Facebook functionality.
|
java.lang.String |
getErrorUserTitle()
Returns a short summary of the error suitable for display to the user.
|
FacebookException |
getException()
Returns the exception associated with this request, if any.
|
org.json.JSONObject |
getRequestResult()
Returns the full JSON response for the corresponding request.
|
org.json.JSONObject |
getRequestResultBody()
Returns the body portion of the response corresponding to the request from Facebook.
|
int |
getRequestStatusCode()
Returns the HTTP status code for this particular request.
|
int |
getSubErrorCode()
Returns the sub-error code returned from Facebook.
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel out,
int flags) |
public static final int INVALID_ERROR_CODE
public static final int INVALID_HTTP_STATUS_CODE
getException()
;public static final android.os.Parcelable.Creator<FacebookRequestError> CREATOR
public FacebookRequestError(int errorCode, java.lang.String errorType, java.lang.String errorMessage)
public FacebookRequestError.Category getCategory()
public int getRequestStatusCode()
public int getErrorCode()
public int getSubErrorCode()
public java.lang.String getErrorType()
getCategory()
method, but can provide further details
on the error.public java.lang.String getErrorMessage()
public java.lang.String getErrorRecoveryMessage()
public java.lang.String getErrorUserMessage()
public java.lang.String getErrorUserTitle()
public org.json.JSONObject getRequestResultBody()
public org.json.JSONObject getRequestResult()
public java.lang.Object getBatchRequestResult()
getRequestResult()
.
In case of a batch request, the result will be a JSONArray where the elements
correspond to the requests in the batch. Callers should check the return type against
either JSONObject or JSONArray and cast accordingly.public java.net.HttpURLConnection getConnection()
public FacebookException getException()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeToParcel(android.os.Parcel out, int flags)
writeToParcel
in interface android.os.Parcelable
public int describeContents()
describeContents
in interface android.os.Parcelable