TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

`mfind ... DIR1 NOSUCHDIR DIR2` errors with "NotFoundError" but doesn't specify which #224

Closed trentm closed 7 years ago

trentm commented 9 years ago
$ mfind -t o /trent.mick/public/tmp /trent.mick/public/nada /trent.mick/stor/tmp
mfind: NotFoundError

would be very helpful if the error included the dir that wasn't found.

davepacheco commented 9 years ago

I took a quick look at this. Theoretically this would be easy, since VError is designed exactly to be able to wrap lower-level with an error providing more detail. I ran into a few problems:

Besides that, the error printing code is command-specific, at least for mfind. Overall, It looks like some cleanup will be needed to make this work.

davepacheco commented 9 years ago

The errors-having-no-messages issue is #198, and I do believe this Error is constructed by node-restify. The server is returning an error with code ResourceNotFound, but the error reported is a NotFoundError. I can't find any real references to that anywhere in the client (including node modules), so I think it's constructed from the HTTP status line, which is "404 Not Found".

arekinath commented 7 years ago

Released in 4.2.0