Package com.restfb.exception
Class FacebookResponseStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.restfb.exception.FacebookException
com.restfb.exception.FacebookErrorMessageException
com.restfb.exception.FacebookResponseStatusException
- All Implemented Interfaces:
Serializable
Indicates that the Legacy REST Facebook endpoint returned JSON which indicates an error condition.
This exception may also be thrown when executing certain operations against the Graph API, e.g. FQL queries or Batch API calls.
Example: {"error_code": 2, "error_msg": "The service is not available at this time.", ...}
.
- Author:
- Mark Allen
- See Also:
-
Constructor Summary
ConstructorDescriptionFacebookResponseStatusException
(Integer errorCode, String errorMessage, JsonObject rawError) Creates an exception with the given message and error code. -
Method Summary
Modifier and TypeMethodDescriptionGets the Facebook API error code.Gets the Facebook API error message.Methods inherited from class com.restfb.exception.FacebookErrorMessageException
getDebugHeaderInfo, getRawErrorJson, setDebugHeaderInfo, setRawErrorJson
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FacebookResponseStatusException
Creates an exception with the given message and error code.- Parameters:
errorCode
- Value of the Facebook response attributeerror_code
.errorMessage
- Value of the Facebook response attributeerror_msg
.
-
-
Method Details
-
getErrorCode
Gets the Facebook API error code.- Returns:
- The Facebook API error code.
-
getErrorMessage
Gets the Facebook API error message.- Returns:
- The Facebook API error message.
-