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) {
|
||||
function replaceErr(err, replaceErrFunc) {
|
||||
if (Array.isArray(err)) {
|
||||
const errors = err.filter(error => {
|
||||
return error != undefined && error != null;
|
||||
});
|
||||
let errs = [];
|
||||
for (let e of err)
|
||||
errs.push(replaceErrFunc(e));
|
||||
for (let e of errors) {
|
||||
if (!(e instanceof UserError))
|
||||
errs.push(replaceErrFunc(e));
|
||||
else errs.push(e);
|
||||
}
|
||||
return errs;
|
||||
}
|
||||
return replaceErrFunc(err);
|
||||
|
|
Loading…
Reference in New Issue