Open FarahZaqout opened 5 years ago
@FarahZaqout I knew that I'd be curious to a few things while reading your issues :p, that's why I am reading them. A. you can select multiple lines and reference them in the issue while holding the shift key and selecting the lines from the repo :p B. I might not disagree with what you're stating here, someone else might :p https://softwareengineering.stackexchange.com/questions/350498/handling-errors-in-a-client-server-application
@NoureldeanSaed Yeah, I agree with the post. That's why I'm only checking for status code, a message is unnecessary in these sorts of situations and he can end the response with no worries.
https://github.com/FACG6/posts-project/blob/543acb90ac266203e938b072a03ac282f6506b41/public/js/domSignup.js#L176
The
.catch()
method in your fetch will not be able to handle a 4xx or 5xx response from the server.This is handled in the
.then()
method.the catch in fetch will only see a network error.