JSFiddle - React, Tailwind, and code Playground
by ptitgraig
JavaScript
async function test() {
try {
await fetchHotel();
} catch(e) {
console.log('error test()', e);
}
}
function fetchHotel() {
Promise.reject(new Error('fetchHotel failed'));
}
test();