Skip to content

Commit

Permalink
68 server error (#69)
Browse files Browse the repository at this point in the history
* catch all 5xx errors

* gebruik algemene foutboodschap
  • Loading branch information
cedrikv committed Dec 11, 2018
1 parent 8a05aa1 commit 5fb8792
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions HandlerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ define([
message: 'De opgevraagde resource werd niet gevonden: ' + response.url
};
}
else if (response.status >= 500 && response.status < 600) {
throw {
title: 'Er is een fout opgetreden (' + response.status + ')',
message: 'Er ging iets fout in de server. Onze excuses. Stel je fouten vast of heb je een vraag? ' +
'Mail dan naar <a href="mailto:ict@onroerenderfgoed.be">ict@onroerenderfgoed.be</a>'
};
}
else {
return JSON.parse(response.text || '{}');
}
Expand Down

0 comments on commit 5fb8792

Please sign in to comment.