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

externalinheritedmessage

message: string

externalinheritedname

name: string

response

response: AxiosResponse<any, any>

externaloptionalinheritedstack

stack?: string

staticexternaloptionalinheritedprepareStackTrace

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

staticexternalinheritedstackTraceLimit

stackTraceLimit: number

Methods

staticexternalinheritedcaptureStackTrace

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


    Parameters

    • externaltargetObject: object
    • externaloptionalconstructorOpt: Function

    Returns void