# All files / src/SmoldotProvider errors.ts

80% Statements 4/5
100% Branches 1/1
50% Functions 1/2
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
    10
    11
    12
    13
    14
    15
    16
    1x

    1x
    1x

    1x

     export class HealthCheckError extends Error {
      readonly #cause: unknown;

      getCause(): unknown {
        return this.#cause;
      }

      constructor(response: unknown, message = "Got error response asking for system health") {
        super(message);
        this.#cause = response;
        // 'Error' breaks the prototype chain - restore it
        Object.setPrototypeOf(this, new.target.prototype);
      }
    }