Skip to content

Commit

Permalink
Merge pull request #5 from davide-scola/1.x-return_all_errors
Browse files Browse the repository at this point in the history
[1.x] Validation errors
  • Loading branch information
davide-scola authored Sep 10, 2024
2 parents 4f0e6ee + 7ecced7 commit d7dca6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion facilities/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const Validator = require('fastest-validator')
*/
const v = new Validator({
aliases: Schema.Type,
haltOnFirstError: true,
considerNullAsAValue: true
})

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-ext-helpdesk-js",
"version": "1.0.1",
"version": "1.0.2",
"private": false,
"description": "Bitfinex External Helpdesk Service",
"author": {
Expand Down
4 changes: 3 additions & 1 deletion workers/loc.api/helpdesk.ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ class ExtHelpdesk extends Api {
if (success === true) {
scheduler.put(cb, () => this._fetchList(ua, endpoint, params))
} else {
cb(new Error(`ERR_API_ACTION: ${success[0].message}`))
cb(new Error(`ERR_API_ACTION: Something's not quite right....\n${success.map((error) => {
return '\t!! ' + error.message
}).join('\n')}`))
}
})
}
Expand Down

0 comments on commit d7dca6f

Please sign in to comment.