DEV Community

Discussion on: Simplify JavaScript Promises

Collapse
 
aminnairi profile image
Amin

From the documentation, it is stated that

A fetch() promise only rejects when a network error is encountered

So I guess this is the case when the fetch method can throw an error.

Thread Thread
 
bushblade profile image
Will Adams • Edited

Yeah you'll want to throw your own errors if you're using fetch and want to catch any errors. Something to be aware of otherwise most of your 'errors' will end up in your .then