DEV Community

loading...

Discussion on: Fetch vs. Axios - comparison

Collapse
michaelcurrin profile image
Michael

.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...