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: hide internal error and unknown error message from end user #2544

Merged
merged 7 commits into from
Oct 23, 2023

Conversation

sunng87
Copy link
Member

@sunng87 sunng87 commented Oct 8, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This patch masks error message of any internal error and unknown error from end user, to prevent leak of deployment and other credential information.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@sunng87
Copy link
Member Author

sunng87 commented Oct 9, 2023

It seems we are using some internal 1003 for invalid argument or other user errors.

@sunng87 sunng87 marked this pull request as draft October 9, 2023 02:35
@sunng87 sunng87 marked this pull request as ready for review October 18, 2023 03:26
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #2544 (c8dcba0) into develop (d57b144) will decrease coverage by 0.40%.
The diff coverage is 100.00%.

❗ Current head c8dcba0 differs from pull request most recent head d110014. Consider uploading reports for the commit d110014 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2544      +/-   ##
===========================================
- Coverage    85.16%   84.76%   -0.40%     
===========================================
  Files          738      738              
  Lines       118955   118321     -634     
===========================================
- Hits        101304   100292    -1012     
- Misses       17651    18029     +378     

@sunng87
Copy link
Member Author

sunng87 commented Oct 18, 2023

@evenyag @waynexia @shuiyisong PTAL

There is a chance I haven't covered all errors that should be excluded from StatusCode::Internal. Anytime when we find useful error information being masked like this we can correct its StatusCode to fix.

@sunng87 sunng87 force-pushed the feat/internal-error branch from c8dcba0 to d110014 Compare October 19, 2023 02:54
@waynexia waynexia enabled auto-merge October 23, 2023 03:07
@waynexia waynexia added this pull request to the merge queue Oct 23, 2023
Merged via the queue into GreptimeTeam:develop with commit 0fbde48 Oct 23, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants