[Vuejs]-Not fulfilled Promises without catch block (unhandledrejection) javascript

0👍

unhandledrejection is for the native Promises currently only implemented in Chrome. If you want to log those error also in other browser you would need to overwrite the native Promise with another implementation like bluebird:

Promise.reject("error!");
window.addEventListener('unhandledrejection', event => {
  console.log('i am error')
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.5.1/bluebird.js"></script>

You need to make sure that bluebird is loaded as the first script.

bluebird: Error management configuration

Leave a comment