We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b49fc4 commit 91b68f0Copy full SHA for 91b68f0
relay_rpc/src/rpc.rs
@@ -68,6 +68,9 @@ pub enum GenericError {
68
#[error("Authorization error: {0}")]
69
Authorization(BoxError),
70
71
+ #[error("Too many requests")]
72
+ TooManyRequests,
73
+
74
/// Request parameters validation failed.
75
#[error("Request validation error: {0}")]
76
Validation(#[from] ValidationError),
@@ -98,6 +101,7 @@ impl GenericError {
98
101
pub fn code(&self) -> i32 {
99
102
match self {
100
103
Self::Authorization(_) => 3000,
104
+ Self::TooManyRequests => 3001,
105
Self::Serialization(_) => -32700,
106
Self::Validation(_) => -32602,
107
Self::RequestMethod => -32601,
0 commit comments