File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ connection.
4444For stream resets, when the underlying transport supports it, implementations
4545SHOULD allow sending an error code on both closing the read side of the stream, and resetting the write side of the stream.
4646
47- ## Libp2p Error Codes
48- TODO!
47+ ## Libp2p Reserved Error Codes
48+ see [ Libp2p error codes ] ( ./libp2p-error-codes.md ) for the libp2p reserved error codes.
4949
5050## Wire Encoding
5151Different transports will encode the 32-bit error code differently.
Original file line number Diff line number Diff line change 1+ # Libp2p error codes
2+
3+ ## TODO!
4+ make this a CSV
5+
6+ ## Error Codes
7+
8+ | Name | Code | Description |
9+ | --- | --- | --- |
10+ | NO_ERROR | 0 | No reason provided for disconnection. This is equivalent to closing a connection or resetting a stream without any error code. |
11+ | Reserved For Transport | 0x1 - 0x1000 | Reserved for transport errors
12+ | GATED | 0x1001 | Connection rejected because the connection was gated. Most likely the IP / node is blacklisted. |
13+ | RESOURCE_LIMIT_EXCEEDED | 0x1002 | Connection rejected because we ran into a resource limit. Implementations MAY retry with a backoff |
14+ | PROTOCOL_VIOLATION | 0x1003 | The peer violated the protocol. |
15+ | SUPPLANTED | 0x1004 | Connection Closed because a better connection was available |
16+ | GARBAGE_COLLECTED | 0x1005 | The connection was garbage collected. |
17+ | SHUTDOWN | 0x1006 | The node is going down. |
18+ | PROTOCOL_NEGOTIATION_FAILED | 0x1007 | Rejected because we couldn't negotiate a protocol |
19+ | BAD_REQUEST | 0x1008 | Rejected because the request was invalid |
You can’t perform that action at this time.
0 commit comments