Favorites

JavaScript Promise.prototype.catch() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Promise.prototype.catch()
JavaScript Promise Instance methodThis method is supported by all modern browsers.
Updated 28th November 2026

The catch() method registers a function to handle a promise's rejection, such as a failed network request.

Description

The catch() method schedules a function to run if the promise is rejected. It's shorthand for then(undefined, onRejected). Placed at the end of a chain, it catches an error from any earlier step. The returned promise fulfills with whatever the handler returns, so the chain can recover and continue.

A common mistake is forgetting to return the value or rethrow inside catch(): returning nothing makes the chain continue with undefined as if everything were fine. If the error can't be handled at this point, throw it again so code further along knows the operation failed.

With async functions, try...catch around await does the same job. Adding a catch() to promises you don't await prevents "unhandled promise rejection" warnings.

Syntax

promise.catch(onRejected)

Parameters

  • onRejectedA function called with the reason when the promise rejects.

Return Value

A new promise.

Example

Promise.resolve()
  .then(() => { throw new Error('Step 2 failed'); })
  .then(() => console.log('skipped'))
  .catch(err => { console.log('Caught:', err.message); return 'fallback'; })
  .then(v => console.log('Continued with', v));

Browser Support

The following information will show you the current browser support for the Promise.prototype.catch() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee