-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server): 适配器错误信息为嵌套型而导致页面显示不正确的问题 (#1275)
**问题背景** 在适配器异常时页面统一错误处理的issue中 #1182 如果已经是处理封装过的`grpc error`, 会在 `callOnOne`执行时统一处理为 `code = status.INTERNAL`的错误且将errorObject直接写入details,导致部分页面出现 适配器的错误信息详细变为嵌套型对象,无法正确解析 ![image](https://github.com/PKUHPC/SCOW/assets/43978285/054e0f47-8d6e-4350-81dc-676e78ac6fcf) **修改** 统一错误处理时 判断callOnOne返回的error类型,如果是已处理过的grpc error直接抛出错误 **修改后** 前端页面可以正确获取已处理的grpc error的 code, message等,正确显示前端对应的错误信息 统一错误处理也可正常显示 ![image](https://github.com/PKUHPC/SCOW/assets/43978285/0d1a0e89-4d73-4899-bfce-c583793ec3e4) ![image](https://github.com/PKUHPC/SCOW/assets/43978285/bf1591fe-1862-4f5a-bb32-26528cd7f6cb) ![image](https://github.com/PKUHPC/SCOW/assets/43978285/a209ad99-d871-42be-9ab7-c0c1ff3716a5)
- Loading branch information
Showing
3 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@scow/portal-server": patch | ||
"@scow/mis-server": patch | ||
--- | ||
|
||
修复请求集群适配器接口的报错信息中出现嵌套型信息,导致页面报错信息显示不正确的问题 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters