Skip to content
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

feat: return rpc detail error message #811

Merged
merged 13 commits into from
Oct 14, 2022
Merged

feat: return rpc detail error message #811

merged 13 commits into from
Oct 14, 2022

Conversation

wenxuwan
Copy link
Member

@wenxuwan wenxuwan commented Oct 11, 2022

What this PR does:

When status code is not ResponseStatusSuccess in bolt response, now will return directly, the logic of AfterInvoke will not be executed. If the server returns some abnormal information while reporting an error, the user cannot obtain the specific information of the abnormal information through AfterInvoke

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

When the bolt's status code is not ResponseStatusSuccess, it does not return error directly, but wraps the error information in the RPCResponse structure, and continues to execute the logic in the subsequent AfterInvoke. If the returned error message is successfully parsed in AfterInvoke (here may include information such as the server's specific exception stack), user can print the details of error message

Does this PR introduce a user-facing change?:


@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 60.50% // Head: 60.55% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (89767e2) compared to base (4a40509).
Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #811      +/-   ##
==========================================
+ Coverage   60.50%   60.55%   +0.04%     
==========================================
  Files         135      135              
  Lines        8807     8815       +8     
==========================================
+ Hits         5329     5338       +9     
+ Misses       2825     2823       -2     
- Partials      653      654       +1     
Impacted Files Coverage Δ
components/rpc/types.go 53.84% <ø> (ø)
pkg/grpc/dapr/dapr_api.go 56.09% <0.00%> (-1.41%) ⬇️
components/rpc/invoker/mosn/mosninvoker.go 71.11% <50.00%> (-1.62%) ⬇️
...onents/rpc/invoker/mosn/transport_protocol/bolt.go 97.59% <81.81%> (+5.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wenxuwan wenxuwan changed the title return rpc detail error message feat:return rpc detail error message Oct 11, 2022
@wenxuwan wenxuwan changed the title feat:return rpc detail error message feat: return rpc detail error message Oct 11, 2022
Copy link
Member

@seeflood seeflood left a comment

Choose a reason for hiding this comment

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

lgtm

@wenxuwan wenxuwan merged commit 0629c4e into mosn:main Oct 14, 2022
@wenxuwan wenxuwan deleted the rpc_error_details branch October 14, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants