Exceptions

exception fbchat.FacebookError(message)[source]

Base class for all custom exceptions raised by fbchat.

All exceptions in the module inherit this.

message

A message describing the error

exception fbchat.HTTPError(message, status_code=None)[source]

Base class for errors with the HTTP(s) connection to Facebook.

status_code

The returned HTTP status code, if relevant

exception fbchat.ParseError(message, data)[source]

Raised when we fail parsing a response from Facebook.

This may contain sensitive data, so should not be logged to file.

data

The data that triggered the error.

The format of this cannot be relied on, it’s only for debugging purposes.

exception fbchat.NotLoggedIn(message)[source]

Raised by Facebook if the client has been logged out.

exception fbchat.ExternalError(message, description, code=None)[source]

Base class for errors that Facebook return.

description

The error message that Facebook returned (Possibly in the user’s own language)

code

The error code that Facebook returned

exception fbchat.GraphQLError(message, description, code=None, debug_info=None)[source]

Raised by Facebook if there was an error in the GraphQL query.

debug_info

Query debug information

exception fbchat.InvalidParameters(message, description, code=None)[source]

Raised by Facebook if:

  • Some function supplied invalid parameters.

  • Some content is not found.

  • Some content is no longer available.

exception fbchat.PleaseRefresh(message, description, code=1357004)[source]

Raised by Facebook if the client has been inactive for too long.

This error usually happens after 1-2 days of inactivity.