Skip to content

Commit

Permalink
Fix(errors): Fixed no result error
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdm committed Mar 23, 2017
1 parent 3e5d780 commit 2e81195
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ module.exports = function (config) {

if (data.error) {
doError ('API error', data.error, res, request.callback);
} else if (data.original && data.original.error) {
if (data.original.error.match (/ niet gevonden\.$/)) {
doError ('no result', null, res, request.callback);
} else {
doError ('API error', data.original.error, res, request.callback);
}
} else if (Object.keys (data).length === 1 && Object.keys (data.headers).length === 0) {
doError ('no result', null, res, request.callback);
} else {
Expand Down

0 comments on commit 2e81195

Please sign in to comment.