summaryrefslogtreecommitdiffstats
path: root/server/lib/httpresponse.js
diff options
context:
space:
mode:
authorJannik Schönartz2021-03-09 22:36:29 +0100
committerJannik Schönartz2021-03-09 22:36:29 +0100
commit22bd093ba34fd40ba6eefcb234572e1e173bc4af (patch)
tree85b6950fa53b624ed8623742715ac973f9988987 /server/lib/httpresponse.js
parent[server/pci] Restructure parseIds output & small bug fixes (diff)
downloadbas-22bd093ba34fd40ba6eefcb234572e1e173bc4af.tar.gz
bas-22bd093ba34fd40ba6eefcb234572e1e173bc4af.tar.xz
bas-22bd093ba34fd40ba6eefcb234572e1e173bc4af.zip
[server/external-backends] Add error logging of object deletion in the external backends
Diffstat (limited to 'server/lib/httpresponse.js')
-rw-r--r--server/lib/httpresponse.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/httpresponse.js b/server/lib/httpresponse.js
index c402e39..61697c9 100644
--- a/server/lib/httpresponse.js
+++ b/server/lib/httpresponse.js
@@ -29,13 +29,13 @@ HttpResponse.successBatch = (action, type, count) => {
// ############################################################################
// ############################## WARNING #####################################
-HttpResponse.warningBatch = (action, type, successfull, count) => {
+HttpResponse.warningBatch = (action, type, successfull, count, errors) => {
const failed = count - successfull
let tmpType = type
if (failed > 1) tmpType += 's'
if (Array.isArray(type)) type = type[successfull === 1 ? 0 : 1]
else if (successfull !== 1) type += 's'
- return new HttpResponse(200, action.toUpperCase() + '_MULTIPLE', `Warning: ${action} ${successfull}/${count} ${type}. ${failed} ${tmpType} failed.`, { successfull, count })
+ return new HttpResponse(200, action.toUpperCase() + '_MULTIPLE', `Warning: ${action} ${successfull}/${count} ${type}. ${failed} ${tmpType} failed. ${errors.length} external errors occurred.`, { successfull, count, errors })
}
// ############################################################################