lowest log level for eth_sendRawTransaction
these are showing up in sentry with things like 'not enough funds'. its an error for the user to see, not us
This commit is contained in:
parent
c0b457cec8
commit
79075f9974
@ -28,6 +28,7 @@ use futures::stream::FuturesUnordered;
|
||||
use futures::stream::StreamExt;
|
||||
use hashbrown::{HashMap, HashSet};
|
||||
use ipnet::IpNet;
|
||||
use log::Level;
|
||||
use log::{debug, error, info, warn};
|
||||
use metered::{metered, ErrorCount, HitCount, ResponseTime, Throughput};
|
||||
use migration::sea_orm::{self, ConnectionTrait, Database, DatabaseConnection};
|
||||
@ -989,6 +990,7 @@ impl Web3ProxyApp {
|
||||
request,
|
||||
Some(request_metadata.clone()),
|
||||
None,
|
||||
Level::Trace,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
@ -312,6 +312,7 @@ impl Web3Connections {
|
||||
active_request_handles: Vec<OpenRequestHandle>,
|
||||
method: &str,
|
||||
params: Option<&serde_json::Value>,
|
||||
error_level: Level,
|
||||
// TODO: remove this box once i figure out how to do the options
|
||||
) -> Result<Box<RawValue>, ProviderError> {
|
||||
// TODO: if only 1 active_request_handles, do self.try_send_request?
|
||||
@ -320,7 +321,7 @@ impl Web3Connections {
|
||||
.into_iter()
|
||||
.map(|active_request_handle| async move {
|
||||
let result: Result<Box<RawValue>, _> = active_request_handle
|
||||
.request(method, &json!(¶ms), Level::Error.into())
|
||||
.request(method, &json!(¶ms), error_level.into())
|
||||
.await;
|
||||
result
|
||||
})
|
||||
@ -361,7 +362,7 @@ impl Web3Connections {
|
||||
}
|
||||
|
||||
// TODO: what should we do if we get here? i don't think we will
|
||||
panic!("i don't think this is possible")
|
||||
unimplemented!("this shouldn't be possible")
|
||||
}
|
||||
|
||||
/// get the best available rpc server
|
||||
@ -732,6 +733,7 @@ impl Web3Connections {
|
||||
request: JsonRpcRequest,
|
||||
request_metadata: Option<Arc<RequestMetadata>>,
|
||||
block_needed: Option<&U64>,
|
||||
error_level: Level,
|
||||
) -> anyhow::Result<JsonRpcForwardedResponse> {
|
||||
loop {
|
||||
match self
|
||||
@ -755,6 +757,7 @@ impl Web3Connections {
|
||||
active_request_handles,
|
||||
request.method.as_ref(),
|
||||
request.params.as_ref(),
|
||||
error_level,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user