---
title: "ServiceError | Client js | Api client"
description: "Documentation for MapTiler Client"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Class ServiceError

A ServiceError is an Error that includes the HTTP response details

#### Hierarchy

-   Error
    -   ServiceError

-   Defined in [services/ServiceError.ts:4](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/services/ServiceError.ts#L4)

##### Index

### Constructors

[constructor](#constructor)

### Properties

[res](#res)

## Constructors

### constructor[](#constructor)

-   new ServiceError(res: Response, customMessage?: string): ServiceError[](#constructorserviceerror)
    
    #### Parameters
    
    -   res: Response
    -   customMessage: string = ""
    
    #### Returns ServiceError
    
    Overrides Error.constructor
    
    -   Defined in [services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/services/ServiceError.ts#L5)
    

## Properties

### res[](#res)

res: Response

-   Defined in [services/ServiceError.ts:6](https://github.com/maptiler/maptiler-client-js/blob/f88659ae276c959a754e4c0f3b5c2aae1f483caa/src/services/ServiceError.ts#L6)
