You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example when fetching table rows, if you pass a bad value for scope (a bug with Name type that was fixed already caused this example), then the server has an error. This error does not get picked up in match against result here:
Err(_) => returnErr(ClientError::NETWORK("Failed to get table rows".into())),
};
So, it continues beyond that and then attempts to parse the JSON and extract table row response values from an error payload:
"{"code":500,"message":"Internal Service Error","error":{"code":3010000,"name":"chain_type_exception","what":"chain type exception","details":[{"message":"Could not convert scope string '.' to any of the following: uint64_t, valid name, or valid symbol (with or without the precision)","file":"chain_plugin.cpp","line_number":1483,"method":"convert_to_type"}]}}"
Because more is None and so the error seems like a bad response but really the issue is that we aren't properly check the response to be an error.
The match above likely checks for http level failures, and in this case it's a healthy http response that contains an error payload. Need to figure out the right fields in an http response to check to see if the response is an error before we continue to treat it as a healthy response payload. HINT: Check how the antelope typescript library does it in WharfKit
The text was updated successfully, but these errors were encountered:
For example when fetching table rows, if you pass a bad value for scope (a bug with Name type that was fixed already caused this example), then the server has an error. This error does not get picked up in match against result here:
antelope-rs/crates/antelope/src/api/v1/chain.rs
Lines 244 to 247 in ccd4422
So, it continues beyond that and then attempts to parse the JSON and extract table row response values from an error payload:
Which fails here:
antelope-rs/crates/antelope/src/api/v1/chain.rs
Line 250 in ccd4422
Because
more
isNone
and so the error seems like a bad response but really the issue is that we aren't properly check the response to be an error.The match above likely checks for http level failures, and in this case it's a healthy http response that contains an error payload. Need to figure out the right fields in an http response to check to see if the response is an error before we continue to treat it as a healthy response payload. HINT: Check how the antelope typescript library does it in WharfKit
The text was updated successfully, but these errors were encountered: