Home Manual Reference Source
public class | source

ApiError

Direct Subclass:

ValidationError

Errors generated by the API

Constructor Summary

Public Constructor
public

constructor(error: AxiosError, request: XMLHttpRequest | ClientRequest, response: AxiosResponse)

Member Summary

Public Members
public get

code: Number: *

Http error code

public get

config: AxiosRequestConfig: *

Get the request config

public get

Returns if the error contained a stacktrace that has been parsed This should only be true if the API is in debug mode.

public get

Error message

public get

Get the axios request

public get

response: AxiosResponse: *

Get the axios response

public get

trace: Array<{line: Number, file: String, code: String}>: *

Get the parsed stacktrace from the error

public get

type: String: *

Error type

Method Summary

Public Methods
public

Display-able string

Public Constructors

public constructor(error: AxiosError, request: XMLHttpRequest | ClientRequest, response: AxiosResponse) source

Params:

NameTypeAttributeDescription
error AxiosError

Axios error

error.config AxiosRequestConfig

Request config

request XMLHttpRequest | ClientRequest

Request

response AxiosResponse

Response

Public Members

public get code: Number: * source

Http error code

Return:

Number

Http error code

public get config: AxiosRequestConfig: * source

Get the request config

Return:

AxiosRequestConfig

Request config

public get hasTrace: boolean: * source

Returns if the error contained a stacktrace that has been parsed This should only be true if the API is in debug mode.

Return:

boolean

If the Error contains a stacktrace

public get message: String: * source

Error message

Return:

String

Error message

public get request: Object: * source

Get the axios request

Return:

Object

Request object

public get response: AxiosResponse: * source

Get the axios response

Return:

AxiosResponse

Axios response

public get trace: Array<{line: Number, file: String, code: String}>: * source

Get the parsed stacktrace from the error

Return:

Array<{line: Number, file: String, code: String}>

Stacktrace

public get type: String: * source

Error type

Return:

String

Error type

Public Methods

public toString(): string source

Display-able string

Return:

string

Displayable error string