Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

服务不存在时,多个错误只返回第一个 #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
reallovelei wants to merge 6 commits into polarismesh:main
base: main
Choose a base branch
Loading
from reallovelei:fix/multi_err_94

Conversation

Copy link
Contributor

@reallovelei reallovelei commented Nov 3, 2022

Please provide issue(s) of this PR:
Fixes #94

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • Configuration
  • Docs
  • Performance and Scalability
  • Naming
  • HealthCheck
  • Test and Release

Please check any characteristics that apply to this pull request.

  • Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.

Copy link
Contributor Author

@andrewshan look at this pr, OK?

return model.NewSDKError(model.ErrCodeServerUserError, rawErr,
fmt.Sprintf("multierrs received for GetInstances request, serviceKey: %s", *dstService))
// 只要有一个错误就立刻返回,避免所以错误都抛出来干扰 开发者的判断。
for key, sdkErr := range sdkErrs {
Copy link
Member

@andrewshan andrewshan Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议这样,全部的错误信息还是要打印到日志上,方便定位,然后只返回第一个错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers

@andrewshan andrewshan andrewshan left review comments

@daheige daheige daheige approved these changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

服务不存在时,不抛错误,只返回空实例列表

AltStyle によって変換されたページ (->オリジナル) /