easy5 pts · first answer countsjavascriptfetch-api
fetch and error status codes
The API returns 404 for this request. What happens?
try {
const res = await fetch('/api/orders/99')
const data = await res.json()
render(data)
} catch (e) {
showError()
}Discussion 0
Join free to post in the discussion.
Related questions
- Timer vs promise orderFull Stack Developer
- try/catch around an async callFull Stack Developer
- map with an async callbackFull Stack Developer
- Dates sent through JSONFull Stack Developer
- Birthday shows one day earlyFull Stack Developer
- Large IDs change in the browserFull Stack Developer
- Block scope of letFrontend Developer
- Loose vs strict equalityFrontend Developer