Skip to content

⚑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.

RefusedToProcess #

Bases: Exception

I'm a teapot 418

Who knows? Maybe the server becomes a teapot!

EntityNotProcessable #

Bases: Exception

Unprocessable entity 422

Something went wrong on your payload. Like, the username of the address while creating the account isn't long enough, or, the account's domain isn't correct. Things like that.

RatelimitError #

Bases: Exception

Too many requests 429

You exceeded the limit of 8 requests per second! Try delaying the request by one second!

πŸš€ 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.