(#2545) - throw errors instead of returning them#2546
(#2545) - throw errors instead of returning them#2546calvinmetcalf wants to merge 1 commit intomasterfrom
Conversation
|
Looks like this causes errors in pouchdb-server. Might have to open a parallel pull req in express-pouchdb as well. |
|
Not being able to identify errors by their name actually breaks quite a bit of the code. There are a lot of places where we check I would much rather we have a single commit that fixes all the problems with non-JS-style errors rather than the piecemeal thing we've been doing so far. |
|
I would like to do it in one swoop as well, but I doubt I will have time for that and those gigantic pulls that change every file tend to be very tricky. |
|
Fair enough. Also there doesn't seem to be anywhere that we're trying to detect these particular errors. Let's merge the express-pouchdb one, get a green check here, and then +1. |
|
yeah I tried to get all of the files on friday when I had some time, but ended up doing a huge commit to detached head of the wrong branch |
|
+1 when green, see my comments in the express-pouchdb PR. |
|
published express@0.5.3, but NPM is being very eventually consistent today |
|
@calvinmetcalf Your express-pouchdb fix is in, but it's still failing due to this: |
|
woops typo on my part |
lib/utils.js
Outdated
There was a problem hiding this comment.
think you need to set status = 400 here
|
@calvinmetcalf Still not passing... |
|
did we publish the new version of express-pouchdb yet? |
|
yeah |
|
the one with 01183ff9357c99751d1da4733b2b8bdfdd888131? |
|
this is the one that was supposed to fix it, no? pouchdb/express-pouchdb@487d01a |
|
didn't fix it completely hence the other one, sometimes a 400 error would On Sun, Aug 10, 2014 at 11:54 AM, Nolan Lawson notifications@github.com
-Calvin W. Metcalf |
|
Those are both merged into master tho. |
|
Ah crap need to publish. One sec. |
strictly speaking this is a breaking change as you can't use error name to identify the errors, but error.name means something kinda specific in js so hopefully thats ok.