Skip to content

Commit

Permalink
Merge pull request #1590 from input-output-hk/feat/lw-12235-handle-ex…
Browse files Browse the repository at this point in the history
…pected-blockfrost-404s

fix: [lw-12235] handle expected blockfrost 404 errors
  • Loading branch information
vetalcore authored Feb 10, 2025
2 parents a9bd3c8 + 3856c60 commit 5fa8e16
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { BlockfrostClient, BlockfrostError } from './BlockfrostClient';
import { HealthCheckResponse, Provider, ProviderError, ProviderFailure } from '@cardano-sdk/core';
import { Logger } from 'ts-log';
import { contextLogger } from '@cardano-sdk/util';
import { isBlockfrostNotFoundError } from './util';
import type { AsyncReturnType } from 'type-fest';
import type { BlockFrostAPI } from '@blockfrost/blockfrost-js';

Expand Down Expand Up @@ -46,7 +47,7 @@ export abstract class BlockfrostProvider implements Provider {
this.logger.debug('response', response);
return response;
} catch (error) {
this.logger.error('error', error);
isBlockfrostNotFoundError(error) ? this.logger.debug('Blockfrost not found', error) : this.logger.error(error);
throw this.toProviderError(error);
}
}
Expand Down

0 comments on commit 5fa8e16

Please sign in to comment.