Bug 32030: Handle error 401 Unauthorized from EBSCO api - Display all messages

In case there are more than one message.

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-10-20 09:39:59 +02:00 committed by Tomas Cohen Arazi
parent ff1fd62314
commit f62e6ebbaa
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -496,7 +496,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
alert(__("Something went wrong when loading the table.\n%s: %s. \n%s").format(
settings.jqXHR.status,
settings.jqXHR.statusText,
settings.jqXHR.responseJSON.errors ? settings.jqXHR.responseJSON.errors[0].message : ''
settings.jqXHR.responseJSON.errors ? settings.jqXHR.responseJSON.errors.map(m => m.message).join("\n") : ''
));
} else {
alert(__("Something went wrong when loading the table."));