β‘Errors you may encounter#
π Defined errors#
MissingArgument
#
Bases: Exception
Bad request 400
Something in your payload is missing! Or, the payload isn't there at all.
AccountTokenInvalid
#
Bases: Exception
Unauthorized 401
Your token isn't correct (Or the headers hasn't a token at all!). Remember, every request (Except POST /accounts and POST /token) should be authenticated with a Bearer token!
EntityNotFound
#
Bases: Exception
Not found 404
You're trying to access an account that doesn't exist? Or maybe reading a non-existing message? Go check that!
MethodNotAllowed
#
Bases: Exception
Method not allowed 405
Maybe you're trying to GET a /token or POST a /messages. Check the path you're trying to make a request to and check if the method is the correct one.
π Undefined error#
This might raise a normal exception with a string of an error. These are the errors related with internal libraries that the SDK uses.