Quick fix for #3343 - error message did not make the problem obvious, so made sure error handler always outputs something useful.
This commit is contained in:
parent
d1714b7f9a
commit
7a23df361d
|
@ -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…
Reference in New Issue