lib: document the error codes that are only generated internally
diff --git a/include/quiche.h b/include/quiche.h
index 0f63acb..6218877 100644
--- a/include/quiche.h
+++ b/include/quiche.h
@@ -58,10 +58,11 @@
// There is no more work to do.
QUICHE_ERR_DONE = -1,
- // The provided buffer is too short.
+ // The provided buffer is too short. A quiche-specific internal error.
QUICHE_ERR_BUFFER_TOO_SHORT = -2,
// The provided packet cannot be parsed because its version is unknown.
+ // A quiche-specific internal error.
QUICHE_ERR_UNKNOWN_VERSION = -3,
// The provided packet cannot be parsed because it contains an invalid
@@ -72,7 +73,7 @@
QUICHE_ERR_INVALID_PACKET = -5,
// The operation cannot be completed because the connection is in an
- // invalid state.
+ // invalid state. A quiche-specific internal error.
QUICHE_ERR_INVALID_STATE = -6,
// The operation cannot be completed because the stream is in an
@@ -82,10 +83,10 @@
// The peer's transport params cannot be parsed.
QUICHE_ERR_INVALID_TRANSPORT_PARAM = -8,
- // A cryptographic operation failed.
+ // A cryptographic operation failed. A quiche-specific internal error.
QUICHE_ERR_CRYPTO_FAIL = -9,
- // The TLS handshake failed.
+ // The TLS handshake failed. A quiche-specific internal error.
QUICHE_ERR_TLS_FAIL = -10,
// The peer violated the local flow control limits.
@@ -100,7 +101,7 @@
// The received data exceeds the stream's final size.
QUICHE_ERR_FINAL_SIZE = -13,
- // Error in congestion control.
+ // Error in congestion control. A quiche-specific internal error.
QUICHE_ERR_CONGESTION_CONTROL = -14,
};
@@ -411,7 +412,7 @@
/// There is no error or no work to do
QUICHE_H3_ERR_DONE = -1,
- /// The provided buffer is too short.
+ /// The provided buffer is too short. A quiche-specific internal error.
QUICHE_H3_ERR_BUFFER_TOO_SHORT = -2,
/// Internal error in the HTTP/3 stack.
@@ -445,7 +446,7 @@
/// QPACK Header block decompression failure.
QUICHE_H3_ERR_QPACK_DECOMPRESSION_FAILED = -11,
- /// Error originated from the transport layer.
+ /// Error originated from the transport layer. A quiche-specific internal error.
QUICHE_H3_ERR_TRANSPORT_ERROR = -12,
/// The underlying QUIC stream (or connection) doesn't have enough capacity
diff --git a/src/h3/mod.rs b/src/h3/mod.rs
index c6e456b..7936c5f 100644
--- a/src/h3/mod.rs
+++ b/src/h3/mod.rs
@@ -293,7 +293,7 @@
/// There is no error or no work to do
Done,
- /// The provided buffer is too short.
+ /// The provided buffer is too short. A quiche-specific internal error.
BufferTooShort,
/// Internal error in the HTTP/3 stack.
@@ -327,11 +327,13 @@
/// QPACK Header block decompression failure.
QpackDecompressionFailed,
- /// Error originated from the transport layer.
+ /// Error originated from the transport layer. A quiche-specific internal
+ /// error.
TransportError(crate::Error),
/// The underlying QUIC stream (or connection) doesn't have enough capacity
- /// for the operation to complete. The application should retry later on.
+ /// for the operation to complete. The application should retry later on. A
+ /// quiche-specific internal error.
StreamBlocked,
/// Error in the payload of a SETTINGS frame.
diff --git a/src/lib.rs b/src/lib.rs
index 9f2cc90..9581ee1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -335,10 +335,11 @@
/// There is no more work to do.
Done,
- /// The provided buffer is too short.
+ /// The provided buffer is too short. A quiche-specific internal error.
BufferTooShort,
/// The provided packet cannot be parsed because its version is unknown.
+ /// A quiche-specific internal error.
UnknownVersion,
/// The provided packet cannot be parsed because it contains an invalid
@@ -349,7 +350,7 @@
InvalidPacket,
/// The operation cannot be completed because the connection is in an
- /// invalid state.
+ /// invalid state. A quiche-specific internal error.
InvalidState,
/// The operation cannot be completed because the stream is in an
@@ -359,10 +360,10 @@
/// The peer's transport params cannot be parsed.
InvalidTransportParam,
- /// A cryptographic operation failed.
+ /// A cryptographic operation failed. A quiche-specific internal error.
CryptoFail,
- /// The TLS handshake failed.
+ /// The TLS handshake failed. A quiche-specific internal error.
TlsFail,
/// The peer violated the local flow control limits.
@@ -380,7 +381,7 @@
/// The received data exceeds the stream's final size.
FinalSize,
- /// Error in congestion control.
+ /// Error in congestion control. A quiche-specific internal error.
CongestionControl,
}