All files / src mapHealthCheckError.ts

83.33% Statements 5/6
100% Branches 1/1
100% Functions 1/1
80% Lines 4/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 1011x     11x 1x 1x        
import { ProviderError, ProviderFailure } from '@cardano-sdk/core';
 
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const mapHealthCheckError = (error: any) => {
  if (!error) {
    return { ok: false };
  }
  throw new ProviderError(ProviderFailure.Unknown, error);
};