Closed DrBoolean closed 10 years ago
We came across this issue where superagent threw an error if we couldn't connect to the db port. We have several connections so when one didn't connect, the whole app died.
The switch caught every response error, but we couldn't get it to catch http errors like the initial connection.
+1. The switch doesn't handle the case where you get no response at all, and couldn't possibly handle that case. It also raises an error that seems impossible to trap in the client and it crashes our app when it shouldn't crash.
.
An alternate way to handle that error is to take the error argument as the first parameter in the end
callback.
Hi @DrBoolean and @adambaker i manually merged your PR into the develop branch, i will therefore close your PR. Thank you and sorry you had to wait such a long time.
Hi @DrBoolean
What part is this PR covering that isn't already in the default clause of the
switch
. ....I do agree we could be a more verbose on that end, but was wondering if it wouldn't be better to use theres.error
object instead?