Skip to content

Commit

Permalink
handle axios error in registered off chain check
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert committed Feb 28, 2024
1 parent 62cf68b commit 5114218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/x-provider/src/signable-actions/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
UsersApi,
} from '@imtbl/core-sdk';
import { signRaw } from '@imtbl/toolkit';
import { AxiosError } from 'axios';
import { isAxiosError } from 'axios';
import { Signers } from './types';
import { validateChain } from './helpers';
import { ProviderConfiguration } from '../config';
Expand Down Expand Up @@ -56,7 +56,7 @@ export async function isRegisteredOffchain(ethAddress: string, config: ProviderC

return accounts?.length > 0;
} catch (ex) {
if (ex instanceof AxiosError && ex.response?.status === 404) {
if (isAxiosError(ex) && ex.response?.status === 404) {
return false;
}
throw ex;
Expand Down

0 comments on commit 5114218

Please sign in to comment.