Slapdash

  • Register
  • Log in

Axios

Error Handling

Only considers 2xx HTTP statuses success; all others are errors

  • https://github.com/axios/axios/blob/b3be36585884ba1e237fdd0eacf55f678aefc396/lib/defaults/index.js#L144
  • https://axios-http.com/docs/handling_errors

Contrast with fetch()

We can't find the internet

Attempting to reconnect

Something went wrong!

Attempting to reconnect