Status Codes
Every server response will have a http status code which will follow the HTTP status code standards.
But also every response will have this body structure:
{
"status": <status-code | number>,
"data": <data | any>
"error": <error | string>
}
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Custom Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 5001 | Too Many Accounts (for copier or leader when they reach the limit of accounts) |
| 5002 | Leader Not Active (when trying to copy a leader that is not active) |
| 5003 | Leader name has been taken (can't create a new leader with the same name) |
| 5004 | Already copying the leader (same copier shouldn't copy the same leader twice) |
| 5005 | Copier start amount is less than minimum required by leader to start copying |
| 5006 | Commission mismatch (when copier posts a commission but leader has changed commission) |