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

add details in APIError.Error #400

Closed
wants to merge 2 commits into from

Conversation

randmonkey
Copy link
Contributor

Because sync.Solve wraps the error returned from CRUD actions by fmt.Errorf(), the details which are not included in APIError.Error() method is lost in wrapping errors. So Kong/kubernetes-ingress-controller#5274 requires details to be included in Error() method.

@randmonkey randmonkey requested a review from a team as a code owner January 17, 2024 03:39
@randmonkey randmonkey requested a review from a team January 17, 2024 03:39
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (19b8bfa) 53.18% compared to head (bc8ff75) 53.19%.

Files Patch % Lines
kong/error.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #400   +/-   ##
=======================================
  Coverage   53.18%   53.19%           
=======================================
  Files          69       69           
  Lines        5259     5262    +3     
=======================================
+ Hits         2797     2799    +2     
- Misses       1876     1877    +1     
  Partials      586      586           
Flag Coverage Δ
2.1 33.37% <75.00%> (+0.01%) ⬆️
2.2 44.71% <75.00%> (+0.01%) ⬆️
2.3 45.41% <75.00%> (+0.01%) ⬆️
2.4 45.49% <75.00%> (+0.01%) ⬆️
2.5 45.49% <75.00%> (+0.01%) ⬆️
2.6 45.49% <75.00%> (+0.01%) ⬆️
2.7 46.86% <75.00%> (-0.11%) ⬇️
2.8 46.97% <75.00%> (+0.01%) ⬆️
3.0 50.66% <75.00%> (+<0.01%) ⬆️
3.1 52.10% <75.00%> (+<0.01%) ⬆️
3.2 52.16% <75.00%> (+<0.01%) ⬆️
3.3 52.16% <75.00%> (+<0.01%) ⬆️
3.4 52.48% <75.00%> (+<0.01%) ⬆️
community 38.54% <75.00%> (+0.01%) ⬆️
enterprise 51.88% <75.00%> (+<0.01%) ⬆️
enterprise-nightly 50.85% <75.00%> (+<0.01%) ⬆️
integration 53.19% <75.00%> (+<0.01%) ⬆️
nightly 37.83% <75.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@randmonkey
Copy link
Contributor Author

Close this because we can extract APIError from errors returned in sync.Solve in KIC.

@randmonkey randmonkey closed this Jan 17, 2024
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