Rejected state
The rejected state is a Promise state indicating that an asynchronous operation failed and carries a rejection reason rather than a fulfillment value.
Secrets of the JavaScript Ninja, Third Edition
The rejected state is a promise state indicating that the asynchronous operation failed with a rejection reason.
- How it is used
- Represents asynchronous failure as a settled promise outcome with an associated rejection reason.
- How deep it goes
- Defines rejection, settlement, and executor transitions, then traces thrown errors through promise chaining and catch handlers.
- Examples
- Uses reject(reason), executor throws, and a fetch chain that throws on a bad response and handles failure with catch.
- What you can do after
- Diagnose failures across a fetch chain by routing request, status, and JSON errors to one catch handler.
Read how Secrets of the JavaScript Ninja, Third Edition explains rejected state →
Secrets of the JavaScript Ninja, Second Edition
The promise state indicating unsuccessful completion with a rejection reason.
- How it is used
- Handles unsuccessful outcomes of asynchronous computations represented by JavaScript promises.
- How deep it goes
- Defines rejection, explains its triggers, and notes that the state cannot change once reached.
- Examples
- Uses a Hattori promise with success and failure callbacks, plus an alternate reject call.
- What you can do after
- Understand when a promise rejects and how its failure callback differs from its success callback.
Read how Secrets of the JavaScript Ninja, Second Edition explains rejected state →
Also covered in
- JavaScript in DepthIn early access (MEAP)
What to know first
- try-catch blockA try-catch block is a control-flow construct that executes code under exception handling and transfers control to an associated handler when a matching exception occurs.
Related concepts
- promisepart of · A JavaScript Promise is an object representing the eventual completion or failure of an asynchronous operation and its resulting value or reason.
- statekind of · State is information describing the condition or configuration of a system or computation at a particular time that may influence its behavior or subsequent transitions.
- Web Streamsused by · Web Streams is a web platform standard API for asynchronously creating, consuming, and transforming data incrementally through stream objects.
- exceptionproduced by · An exception is a runtime signal or value representing an abnormal condition that interrupts ordinary program flow and can be handled or propagated.
- Promise#catchaddresses · Promise#catch is a JavaScript Promise method that registers a handler for rejection and returns a Promise for the handler's outcome.
Questions about rejected state
What is rejected state?
The rejected state is a Promise state indicating that an asynchronous operation failed and carries a rejection reason rather than a fulfillment value.
Which Manning books explain rejected state?
Secrets of the JavaScript Ninja, Third Edition and Secrets of the JavaScript Ninja, Second Edition.
What should I know before learning rejected state?
Manning books that teach rejected state usually introduce try-catch block first.
What is rejected state a kind of?
Rejected state is a kind of state. State is information describing the condition or configuration of a system or computation at a particular time that may influence its behavior or subsequent transitions.
What is rejected state part of?
Rejected state is part of promise. A JavaScript Promise is an object representing the eventual completion or failure of an asynchronous operation and its resulting value or reason.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

