bothy-sdk
    Preparing search index...

    Class Fault

    One fault; build it with the static methods, nothing else is accepted by inject.

    Index

    Properties

    delayMs: number

    Milliseconds of the FakeServer's clock before a stored_late answer.

    kind: FaultKind

    What goes wrong.

    retryAfter: number

    Whole seconds of the Retry-After header of rate_limited (the header's unit).

    Methods

    • Drops the connection without an answer and stores nothing.

      Returns Fault

      The fault.

    • Answers 429 rate_limited with Retry-After and stores nothing.

      Parameters

      • retryAfter: number

        Whole seconds for the Retry-After header; must not be negative.

      Returns Fault

      The fault.

      RangeError when retryAfter is negative or not an integer.

    • Answers after delayMs of the clock and stores at the end of the wait.

      Parameters

      • delayMs: number

        The wait in milliseconds; must not be negative.

      Returns Fault

      The fault.

      RangeError when delayMs is negative or not a number.

    • Runs and stores the operation, then answers 502 with a problem body.

      Returns Fault

      The fault.