Our volunteers haven't translated this article into Tiếng Việt yet. Join us and help get the job done!
You can also read the article in English (US).

The Promise.reject() method returns a Promise object that is rejected with a given reason.




Reason why this Promise rejected.

Return value

A Promise that is rejected with the given reason.


The static Promise.reject function returns a Promise that is rejected. For debugging purposes and selective error catching, it is useful to make reason an instanceof Error.


Using the static Promise.reject() method

Promise.reject(new Error('fail')).then(function() {
  // not called
}, function(error) {
  console.log(error); // Stacktrace


Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Promise.reject' in that specification.
Standard Initial definition in an ECMA standard.
ECMAScript Latest Draft (ECMA-262)
The definition of 'Promise.reject' in that specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
rejectChrome Full support 32Edge Full support 12Firefox Full support 29IE No support NoOpera Full support 19Safari Full support 8WebView Android Full support 4.4.3Chrome Android Full support 32Edge Mobile Full support YesFirefox Android Full support 29Opera Android Full support YesSafari iOS Full support 8Samsung Internet Android Full support Yesnodejs Full support 0.12


Full support  
Full support
No support  
No support

See also

Document Tags and Contributors

Cập nhật lần cuối bởi: mdnwebdocs-bot,