zanran / node-redmine

node-redmine is a nodejs library which supports 100% features of Redmine's REST API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return more detailed errors from body

awilkins opened this issue · comments

When you do a POST of a new issue, if it fails with a 422 error (Unprocessable entity) it returns a detailed list of errors in the body thus e.g.

{
 "errors": [
    "Customer DOB is not a valid date"
  ]
}

This is really useful when you're trying to diagnose problems with your issue object creation routine. I had several hours of frustrating 422 errors with the node-redmine package and In the end I resorted to converting my object to JSON and using the REST plugin for Atom - upon which I discovered these errors which I'd been missing!