Closed oleiba closed 8 years ago
What about errors that returned from the db?
collection.find(..., function(err, doc) {
if (err) return callback(err) <---?
})
The new error handler middleware cc-error-handler
treats errors which are merely instances of Error
, and not ColoredCoinsError
, as third party errors - and encapsulates them with the original
field in the returned error object if the configured env
is development
.
Otherwise it will not include it at all.