Amplify JS API Documentation
    Preparing search index...

    Error class for errors that associated with unsuccessful HTTP responses. It's throw by API category REST API handlers and GraphQL query handlers for now.

    Hierarchy

    • AmplifyError
      • ApiError
    Index

    Constructors

    • Parameters

      • params: ApiErrorParams

      Returns ApiError

    Properties

    message: string
    metadata?: ResponseMetadata

    Additional metadata that can be used to provide more context to the error.

    name: string
    recoverySuggestion?: string
    stack?: string
    underlyingError?: unknown
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    Accessors

    • get response(): ApiErrorResponse | undefined

      The unwrapped HTTP response causing the given API error.

      Returns ApiErrorResponse | undefined

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: Object
      • OptionalconstructorOpt: Function

      Returns void