mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Use errors.AsErr to extract and detect errors.Error (#1936)
Switches from using errors.Is() to errors.As() so the error context is passed correctly.
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ func (e *entry) WithFields(fields map[string]any) Entry {
|
|||||||
|
|
||||||
func (e *entry) SystemErr(err error) {
|
func (e *entry) SystemErr(err error) {
|
||||||
var athensErr errors.Error
|
var athensErr errors.Error
|
||||||
if !errors.IsErr(err, athensErr) {
|
if !errors.AsErr(err, &athensErr) {
|
||||||
e.Error(err)
|
e.Error(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user