@umbraco-cms/backoffice

    UmbApiError is a class that extends UmbError and represents an error that occurs during an API call.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    cause?: unknown
    message: string
    name: string = 'UmbApiError'
    problemDetails: UmbProblemDetails
    request: unknown
    stack?: string
    status: number
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    • Transforms an ApiError into an UmbApiError.

      Parameters

      • error: Error & { body?: string; request?: unknown; status?: number }

        The ApiError to transform.

      Returns UmbApiError

      The transformed UmbApiError.

      Use UmbCancelError.isUmbApiError instead and map your object to UmbApiError if needed.

    MMNEPVFCICPMFPCPTTAAATR