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

credentials: improve errors and error-handling #292

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

thaJeztah
Copy link
Member

credentials: use errors.Is() to match error-types

credentials: implement errdefs types for typed errors

This allows for checking the error-type returned to be matched with the errdefs utilities.

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2023

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 52.51%. Comparing base (bd83e02) to head (a228f55).
Report is 42 commits behind head on master.

Files Patch % Lines
credentials/error.go 44.44% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
- Coverage   52.74%   52.51%   -0.24%     
==========================================
  Files           9        9              
  Lines         673      676       +3     
==========================================
  Hits          355      355              
- Misses        271      274       +3     
  Partials       47       47              

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

@thaJeztah thaJeztah requested a review from crazy-max June 15, 2023 10:35
@thaJeztah
Copy link
Member Author

Doh! my commit description says errors.Is() but using errors.As(). Probably a nit, but let me fix that to prevent confusion.

This allows for checking the error-type returned to be matched with
the errdefs utilities.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the errors_improvements branch from 1e3101c to a228f55 Compare June 15, 2023 12:59
@thaJeztah
Copy link
Member Author

Fixed 😅

@thaJeztah thaJeztah merged commit 4977273 into docker:master Jun 15, 2023
@thaJeztah thaJeztah deleted the errors_improvements branch June 15, 2023 13:18
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