florianholzapfel/express-restify-mongoose — pull request #82 by wiggin (2014-11-17 11:27:17+00:00)
Title: Set content type json for all error fullError responses

I'm using findOneAndUpdate: false to make sure my mongoose validators and pre.save functions are executed on updates as well. But I noticed that validation errors (and other errors) are returned as text/html instead of application/json. I moved the setHeader() that was used on create errors to the onError function instead.