Class FacebookResponseStatusException

  • All Implemented Interfaces:
    Serializable

    public class FacebookResponseStatusException
    extends FacebookErrorMessageException
    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:
    Serialized Form
    • Constructor Detail

      • FacebookResponseStatusException

        public FacebookResponseStatusException​(Integer errorCode,
                                               String errorMessage,
                                               JsonObject rawError)
        Creates an exception with the given message and error code.
        Parameters:
        errorCode - Value of the Facebook response attribute error_code.
        errorMessage - Value of the Facebook response attribute error_msg.
    • Method Detail

      • getErrorCode

        public Integer getErrorCode()
        Gets the Facebook API error code.
        Returns:
        The Facebook API error code.
      • getErrorMessage

        public String getErrorMessage()
        Gets the Facebook API error message.
        Returns:
        The Facebook API error message.