Skip to content

Commit 3856c60

Browse files
committed
fix: [lw-12235] handle expected blockfrost 404 errors
1 parent a9bd3c8 commit 3856c60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cardano-services-client/src/blockfrost/BlockfrostProvider.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { BlockfrostClient, BlockfrostError } from './BlockfrostClient';
22
import { HealthCheckResponse, Provider, ProviderError, ProviderFailure } from '@cardano-sdk/core';
33
import { Logger } from 'ts-log';
44
import { contextLogger } from '@cardano-sdk/util';
5+
import { isBlockfrostNotFoundError } from './util';
56
import type { AsyncReturnType } from 'type-fest';
67
import type { BlockFrostAPI } from '@blockfrost/blockfrost-js';
78

@@ -46,7 +47,7 @@ export abstract class BlockfrostProvider implements Provider {
4647
this.logger.debug('response', response);
4748
return response;
4849
} catch (error) {
49-
this.logger.error('error', error);
50+
isBlockfrostNotFoundError(error) ? this.logger.debug('Blockfrost not found', error) : this.logger.error(error);
5051
throw this.toProviderError(error);
5152
}
5253
}

0 commit comments

Comments
 (0)