Home Reference Source
import {APIError} from 'technoservs.js/src/error.js'
public class | source

APIError

Extends:

Error → APIError

Constructor Summary

Public Constructor
public

constructor(status: Number, data: Object)

Create a new instance of APIError

Member Summary

Public Members
public get

data: Object: *

Body of the HTTP response (parsed as JSON)

public get

HTTP Status code returned by the API

Private Members
private
private

_status: *

Public Constructors

public constructor(status: Number, data: Object) source

Create a new instance of APIError

Params:

NameTypeAttributeDescription
status Number

HTTP status code of the request

data Object

Body of the HTTP response (parsed as JSON)

Public Members

public get data: Object: * source

Body of the HTTP response (parsed as JSON)

Return:

Object

public get status: Number: * source

HTTP Status code returned by the API

Return:

Number

Private Members

private _message: * source

private _status: * source