@nospamproxy/core
    Preparing search index...

    Common error class to be used for throwing HTTP/Service call related error.

    Hierarchy

    • Error
      • RemoteCallError
    Index

    Constructors

    • Creates an instance of RemoteCallError.

      Parameters

      • status: number

        The HTTP status number of the response.

      • statusText: string

        The HTTP status text of the response.

      • Optionaljson: ErrorJson

        The body of the response in JSON format.

      • OptionaloriginalStack: string

        The stack trace from the original error.

      • Optionalurl: string | URL

        The API url this error is related to.

      Returns RemoteCallError

    Properties

    json?: ErrorJson

    The body of the response in JSON format.

    originalStack?: string

    The stack trace from the original error.

    status: number

    The HTTP status number of the response.

    statusText: string

    The HTTP status text of the response.

    url?: string | URL

    The API url this error is related to.

    Accessors

    • get dependencies(): string[]

      Returns string[]

    • get invalidOperationAdditionalInformation(): string | null

      Returns string | null

    • get invalidOperationErrorCode(): string | null

      Returns string | null

    • get invalidOperationErrorCodeType(): string | null

      Returns string | null

    • get isDependenciesError(): boolean

      Returns boolean

    • get shouldRetry(): boolean

      Returns boolean

    • get structuredError(): | Readonly<
          | {
              "@NoSpamProxy.Error.DependentItems": string[];
              code: "EntityHasDependencies";
              message: string;
          }
          | { code: "Duplicate"; message: string }
          | {
              "@NoSpamProxy.Error.Action": "retry";
              code: "InternalServerError";
              message: string;
          }
          | {
              "@NoSpamProxy.Error.BadRequest.AdditionalInformation": string;
              "@NoSpamProxy.Error.BadRequest.ErrorCode": string;
              "@NoSpamProxy.Error.BadRequest.ErrorCodeType": string;
              code: "InvalidOperation";
              message: string;
          },
      >
      | null

      Returns
          | Readonly<
              | {
                  "@NoSpamProxy.Error.DependentItems": string[];
                  code: "EntityHasDependencies";
                  message: string;
              }
              | { code: "Duplicate"; message: string }
              | {
                  "@NoSpamProxy.Error.Action": "retry";
                  code: "InternalServerError";
                  message: string;
              }
              | {
                  "@NoSpamProxy.Error.BadRequest.AdditionalInformation": string;
                  "@NoSpamProxy.Error.BadRequest.ErrorCode": string;
                  "@NoSpamProxy.Error.BadRequest.ErrorCodeType": string;
                  code: "InvalidOperation";
                  message: string;
              },
          >
          | null

    Methods

    • Returns a string representation of an object.

      Returns string