Browse Source

Quick fix for #3343 - error message did not make the problem obvious, so made sure error handler always outputs something useful.

pull/4023/head
mike12345567 5 years ago
parent
commit
b34ca5b4a2
  1. 9
      packages/server/src/automations/automationUtils.js

9
packages/server/src/automations/automationUtils.js

@ -64,5 +64,14 @@ exports.cleanUpRow = async (appId, tableId, row) => {
}
exports.getError = err => {
if (err == null) {
return "No error provided."
}
if (
typeof err === "object" &&
(err.toString == null || err.toString() === "[object Object]")
) {
return JSON.stringify(err)
}
return typeof err !== "string" ? err.toString() : err
}

Loading…
Cancel
Save