Merge branch 'dev' into 2657-zone_log
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
45fac5d71d
|
@ -145,9 +145,15 @@ module.exports = function(Self) {
|
||||||
rewriteDbError(replaceErrFunc) {
|
rewriteDbError(replaceErrFunc) {
|
||||||
function replaceErr(err, replaceErrFunc) {
|
function replaceErr(err, replaceErrFunc) {
|
||||||
if (Array.isArray(err)) {
|
if (Array.isArray(err)) {
|
||||||
|
const errors = err.filter(error => {
|
||||||
|
return error != undefined && error != null;
|
||||||
|
});
|
||||||
let errs = [];
|
let errs = [];
|
||||||
for (let e of err)
|
for (let e of errors) {
|
||||||
|
if (!(e instanceof UserError))
|
||||||
errs.push(replaceErrFunc(e));
|
errs.push(replaceErrFunc(e));
|
||||||
|
else errs.push(e);
|
||||||
|
}
|
||||||
return errs;
|
return errs;
|
||||||
}
|
}
|
||||||
return replaceErrFunc(err);
|
return replaceErrFunc(err);
|
||||||
|
|
Loading…
Reference in New Issue