docker / docker-credential-helpers

Programs to keep Docker login credentials safe by storing in platform keystores
MIT License
1.08k stars 170 forks source link

credentials: improve errors and error-handling #292

Closed thaJeztah closed 1 year ago

thaJeztah commented 1 year ago

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 commented 1 year ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

thaJeztah commented 1 year ago

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

thaJeztah commented 1 year ago

Fixed 😅