Open
Conversation
Author
|
see #619 |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #626 +/- ##
==========================================
+ Coverage 30.22% 30.43% +0.20%
==========================================
Files 40 41 +1
Lines 3060 3118 +58
==========================================
+ Hits 925 949 +24
- Misses 2069 2096 +27
- Partials 66 73 +7
☔ View full report in Codecov by Sentry. |
binbin0325
reviewed
Jun 24, 2023
Author
|
参照java版,实现了注册中心和配置中心相关接口不同业务异常状态的处理逻辑,包括:
同时,注册中心参照Java版实现,增加实例注册前的参数校验,并返回参数校验的异常提示:
|
Open
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目前sdk提供的api屏蔽了nacos server返回的业务校验异常提示
比如server开启安全认证后,client账密错误server的响应:
{"resultCode":500,"errorCode":403,"message":"user not found!","success":false}比如当前用户只授权读权限,client发起写操作请求server的响应:
{"resultCode":500,"errorCode":403,"message":"authorization failed!","success":false}等等这些错误提示被屏蔽掉对开发人员排查问题来说不太友好。
为此,增加了对errorCode=403业务异常的处理: