From 4ef66d1c5d37bd00d95a374fa15abf7ab1da1692 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 3 Nov 2023 12:26:47 -0700 Subject: [PATCH] fix some error status codes and link to discord --- web3_proxy/src/errors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web3_proxy/src/errors.rs b/web3_proxy/src/errors.rs index d68c1380..51ea5865 100644 --- a/web3_proxy/src/errors.rs +++ b/web3_proxy/src/errors.rs @@ -510,7 +510,7 @@ impl Web3ProxyError { Self::InvalidBlockBounds { min, max } => { trace!(%min, %max, "InvalidBlockBounds"); ( - StatusCode::BAD_REQUEST, + StatusCode::OK, JsonRpcErrorData { message: "Invalid blocks bounds requested".into(), code: StatusCode::BAD_REQUEST.as_u16().into(), @@ -524,7 +524,7 @@ impl Web3ProxyError { Self::IpAddrParse(err) => { debug!(?err, "IpAddrParse"); ( - StatusCode::BAD_REQUEST, + StatusCode::OK, JsonRpcErrorData { message: err.to_string().into(), code: StatusCode::BAD_REQUEST.as_u16().into(), @@ -714,7 +714,7 @@ impl Web3ProxyError { code: -32601, data: Some(json!({ "method": method, - "extra": "contact us if you need this", + "extra": "contact us if you need this. https://discord.llamanodes.com/", })), }, )