DEV Community

Discussion on: Fetch vs. Axios - comparison

Collapse
 
michaelcurrin profile image
Michael Currin

.catch is needed to work with promises to get the expected flow.

You can use try catch but then you need to use the async function syntax. See code samples here.

dev.to/annarankin/finally-in-promi...