feat:1. Okr 添加esc关闭窗口 2. Okr 页面返回错误修复 3. 修复安全漏洞-发送消息接口返回的响应数据,暴露了数据库信息

This commit is contained in:
weifashi
2023-09-11 16:09:49 +08:00
parent 5801d0fc14
commit 4f676c0ccb
5 changed files with 26 additions and 11 deletions

View File

@@ -236,10 +236,10 @@ class AbstractModel extends Model
info($eb);
}
if ($e instanceof ApiException) {
throw new ApiException($e->getMessage(), $e->getData(), $e->getCode());
throw new ApiException( config('app.debug') ? $e->getMessage() : '处理错误', $e->getData(), $e->getCode());
} else {
info($e);
throw new ApiException($e->getMessage() ?: '处理错误');
throw new ApiException( config('app.debug') ? ($e->getMessage() ?: '处理错误') : '处理错误');
}
}
}