Skip to content

Commit 4eca305

Browse files
committed
add a CODE_OUT_RANGE error code
1 parent 91315b7 commit 4eca305

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

error-codes/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Error code 0 signals that no error code was provided. Implementations MUST handl
4242

4343
Error codes from 1 to 100 are reserved for transport errors. These are used by the transports to terminate connections on transport errors.
4444

45-
Error codes from 100 - 10000 are reserved for libp2p. This includes multistream error codes, as it is necessary for libp2p connection establishment over TCP, but not kad-dht or gossip-sub error codes.
45+
Error codes from 100 - 10000 are reserved for libp2p. This includes multistream error codes, as it is necessary for libp2p connection establishment over TCP, but not kad-dht or gossip-sub error codes. Some transports, like QUIC, support sending an error code greater than a 32 bit int. On receiving such a value, implementations MUST use `CODE_OUT_OF_RANGE` as the libp2p error code.
4646

4747
see [Libp2p error codes](./libp2p-error-codes.md) for the libp2p reserved error
4848
codes.

error-codes/libp2p-error-codes.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| GARBAGE_COLLECTED | 106 | Connection was garbage collected |
1414
| SHUTDOWN | 107 | The node is shutting down |
1515
| GATED | 108 | The connection was gated. Most likely the IP / node is blacklisted. |
16+
| CODE_OUT_OF_RANGE | 109 | The error code received from the peer was greater than 4294967295(Max uint32).
1617

1718

1819
## Stream Error Codes
@@ -28,3 +29,4 @@
2829
| GARBAGE_COLLECTED | 106 | Idle Stream was garbage collected |
2930
| SHUTDOWN | 107 | The node is shutting down |
3031
| GATED | 108 | The stream was gated. Most likely the IP / node is blacklisted. |
32+
| CODE_OUT_OF_RANGE | 109 | The error code received from the peer was greater than 4294967295(Max uint32).

0 commit comments

Comments
 (0)