ERROR
← Back to Home
The ERROR response packet is used to tell the client that something went wrong while processing its request.
Response
Figure A: ERROR response byte-map
The ERROR packet contains of two fields:
- Status: a 1-byte number (uint8) between 0 and 255 indicating what kind of error occured. There are some error codes reserved by Plabble, but other error codes can be used freely and will never be reserved.
- Error message: an UTF-8 encoded string that contains a message to tell exactly what went wrong. This message can differ per Plabble implementation and might also contain some metadata like JSON or anything the server likes. It can also be an empty string.
Error codes
The following error codes are reserved by Plabble:
Code | Meaning | Type |
---|---|---|
0 | – reserved – | Global |
1 | Internal Server Error | Global |
2 | Unsupported protocol version | Global |
3 | Invalid permissions (permission denied) | Global |
4 | Authentication failed | Global |
5 | Payload too large | Global |
6 | Bad request | Global |
7 - 9 | – reserved – | Global |
10,11 | – reserved – | Global |
12 | Bucket update (partial response content) | Global |
13 - 20 | – reserved – | Global |
21 | Bucket does not exist | Global |
22 - 29 | – reserved – | Global |
30 | – reserved for CONNECT – | connect |
31 | No certificate available | connect |
32 | Could not upgrade to encrypted connection | connect |
33 - 39 | – reserved for CONNECT – | connect |
40 | – reserved for CREATE – | create |
41 | Bucket already exists | create |
42 - 49 | – reserved for CREATE – | create |
50 | – reserved for PUT – | put |
51 | Selected index in bucket already taken (only if no write permissions and try to append with index) | put |
52 - 59 | – reserved for PUT – | put |
60 | – reserved for APPEND – | append |
61 | Bucket full | append |
62 - 69 | – reserved for APPEND – | append |
70 | – reserved for WIPE – | wipe |
71 | It is not allowed to delete this bucket | wipe |
72 - 79 | – reserved for WIPE – | wipe |
80 - 89 | – reserved for REQUEST– | request |
90 - 99 | – reserved for SUBSCRIBE – | subscribe |
100 - 109 | – reserved for UNSUBSCRIBE – | unsubscribe |
110 - 119 | – reserved for other types – | other |
120 - 127 | – reserved – | Global |
128 - 255 | Free to use. Can differ per underlying protocol | Global |