Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Antony1060 committed Jan 29, 2024
1 parent 1d6ed5d commit 047df75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/src/models/universal_resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abigen!(
);

const MAGIC_UNIVERSAL_RESOLVER_ERROR_MESSAGE: &str =
"execution reverted: UniversalResolver: Wildcard on non-extended resolvers is not supported";
"Wildcard on non-extended resolvers is not supported";

pub async fn resolve_universal(
name: &str,
Expand Down Expand Up @@ -72,7 +72,7 @@ pub async fn resolve_universal(
return ProfileError::RPCError(provider_error);
};

if matches!(rpc_err.as_error_response(), Some(rpc_err_raw) if rpc_err_raw.message == MAGIC_UNIVERSAL_RESOLVER_ERROR_MESSAGE) {
if matches!(rpc_err.as_error_response(), Some(rpc_err_raw) if rpc_err_raw.message.contains(MAGIC_UNIVERSAL_RESOLVER_ERROR_MESSAGE)) {
return ProfileError::NotFound;
}

Expand Down

0 comments on commit 047df75

Please sign in to comment.