1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2025-06-16 13:46:16 +02:00

Rethrow unhandled error from API hooks.

This commit is contained in:
Maciej Lenartowicz
2020-02-18 14:32:59 +01:00
parent 8b7c459855
commit 2b28434712
2 changed files with 10 additions and 4 deletions

View File

@ -65,9 +65,8 @@ export function getErrorPayload(error) {
if (error.request) {
return _("No response received.");
}
/* eslint no-console: "off" */
console.error(error);
return _("An unknown error occurred. Check the console for more info.");
// Return original error because it's not directly related to API request/response.
return error;
}
export function getJSONErrorMessage(error) {