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

Patch coverage: 44.44% and project coverage change: -0.24 ⚠️

Comparison is base (bd83e02) 52.74% compared to head (a228f55) 52.51%.

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              
Impacted Files Coverage Δ
credentials/error.go 33.33% <44.44%> (-3.71%) ⬇️

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

@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.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This allows for checking the error-type returned to be matched with
the errdefs utilities.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Fixed 😅

@thaJeztah thaJeztah merged commit 4977273 into docker:master Jun 15, 2023
10 checks passed
@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.

None yet

3 participants