When something goes wrong with an API call, you will receive an exception.
If the success field is set to true in the struct you get back from a call,
an exception has occurred.
In this case, instead of the normal response, there will be at least two new fields in
the response: code and msg. code is a string that indicates
what went wrong, and msg is a human-readable message. You should not try to parse
the message; msg values are subject to change, but codes are not.
| Code | Description |
| invalid_request_method | A GET method was called with POST request method, or vice versa. |
| bad_login | The login name and password did not match anything in the database. |