Skip to main content
Version: 2.9

ApifyApiError

An ApifyApiError is thrown for successful HTTP requests that reach the API, but the API responds with an error response. Typically, those are rate limit errors and internal errors, which are automatically retried, or validation errors, which are thrown immediately, because a correction by the user is needed.

Hierarchy

  • Error
    • ApifyApiError

Index

Properties

attempt

attempt: number

Number of the API call attempt.

externaloptionalcause

cause?: unknown

clientMethod

clientMethod: string

The invoked resource client and the method. Known issue: Sometimes it displays as unknown because it can’t be parsed from a stack trace.

optionalhttpMethod

httpMethod?: string

HTTP method of the API call.

externalmessage

message: string

name

name: string

originalStack

originalStack: string

Original stack trace of the exception. It is replaced by a more informative stack with API call information.

optionalpath

path?: string

Full path of the API endpoint (URL excluding origin).

externaloptionalstack

stack?: string

statusCode

statusCode: number

HTTP status code of the error.

optionaltype

type?: string

The type of the error, as returned by the API.

staticexternaloptionalprepareStackTrace

prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Type declaration

staticexternalstackTraceLimit

stackTraceLimit: number

Methods

staticexternalcaptureStackTrace

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object


    Parameters

    • externaltargetObject: object
    • externaloptionalconstructorOpt: Function

    Returns void