Skip to content

Commit

Permalink
Use errors.AsErr to extract and detect errors.Error (#1936)
Browse files Browse the repository at this point in the history
Switches from using errors.Is() to errors.As() so the error context is passed correctly.
  • Loading branch information
kkHAIKE authored Apr 9, 2024
1 parent a32e5f0 commit a5277a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/log/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (e *entry) WithFields(fields map[string]any) Entry {

func (e *entry) SystemErr(err error) {
var athensErr errors.Error
if !errors.IsErr(err, athensErr) {
if !errors.AsErr(err, &athensErr) {
e.Error(err)
return
}
Expand Down

0 comments on commit a5277a3

Please sign in to comment.