[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [http](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.http) / [HttpError](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.http#httperror) / HttpError

# Class: HttpError

[http](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.http).[HttpError](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.http#httperror).HttpError

Http error

## Hierarchy

- `Error`
↳ **`HttpError`**


## Table of contents

Constructors
- [new HttpError(message, options, code, request, response)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.http.httperror.httperror.md#new httperror(message, options, code, request, response))


Accessors
| [code](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.http.httperror.httperror#code) | [name](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.http.httperror.httperror#name) |
|  --- | --- |


Methods
| [toJSON](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.http.httperror.httperror#tojson) | [toString](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.http.httperror.httperror#tostring) |
|  --- | --- |


## Contents

Constructors
#### new HttpError(message, options, code, request, response)

• **new HttpError**(`message`, `options?`, `code?`, `request?`, `response?`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `message` | `string` | message |
| `Optional` `options` | `any` | options |
| `Optional` `code` | `string` | code |
| `Optional` `request` | `any` | request |
| `Optional` `response` | `any` | response |


#### Overrides

Error.constructor

Accessors
#### code

• `get` **code**(): `string`

#### Returns

`string`

#### name

• `get` **name**(): `string`

name

**`Name`**

module:geotoolkit/http/HttpError~HttpError#name

#### Returns

`string`

#### Overrides

Error.name

• `set` **name**(`value`): `void`

name

**`Name`**

module:geotoolkit/http/HttpError~HttpError#name

#### Parameters

| Name  | Type  |
|  --- | --- |
| `value` | `string` |


#### Returns

`void`

#### Overrides

Error.name

Methods
#### toJSON

▸ **toJSON**(): [`JSON`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.http#httperror#json)

Return information about error

#### Returns

[`JSON`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.http#httperror#json)

#### toString

▸ **toString**(): `string`

Returns a string representing the specified object

#### Returns

`string`