Skip to main content
Version: Next

InvalidResponseBodyError

This error exists for the quite common situation, where only a partial JSON response is received and an attempt to parse the JSON throws an error. In most cases this can be resolved by retrying the request. We do that by identifying this error in HttpClient.

The properties mimic AxiosError for easier integration in HttpClient error handling.

Hierarchy

  • Error
    • InvalidResponseBodyError

Index

Constructors

constructor

Properties

cause

cause: Error

code

code: string

externalmessage

message: string

externalname

name: string

response

response: AxiosResponse<any, any>

externaloptionalstack

stack?: string

staticexternaloptionalprepareStackTrace

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

Optional override for formatting stack traces

@see

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Parameters

      • externalerr: Error
      • externalstackTraces: CallSite[]

      Returns any

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