# Custom Error

*noun*

say it: **“KUS-tum AIR-er”** **/ˈkʌstəm ˈɛrər/**

Your own error class, made with extends Error, for a problem your program knows about, such as ServingsError.

## What is **Custom Error** in JavaScript?

**Custom Error** — An application-specific error class extending JavaScript's Error class.

```javascript
class InvalidOrderError extends Error {
}
```

## In a sentence

- “I made a **custom error**, ServingsError, so the catch block can tell a bad serving size apart from a bug.”

Level: Journeyman · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/custom-error
