DEV Community

Discussion on: Displaying a css spinner on ajax calls with fetch api

Collapse
 
bgadrian profile image
Adrian B.G.

You did a common mistake, to not hide the spinner at error, see promise.catch().

I know that error handling is a tabu subject in the JS ecosystem, but we should change this.

Collapse
 
wangonya profile image
Kelvin Wangonya

Didnโ€™t know about promise.catch. Iโ€™ll check it out. Thanks!