Skip to content

Commit e5aea9b

Browse files
committed
Fix APIError.Empty() logic
1 parent f9cf023 commit e5aea9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sentry/errors.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func (e *APIError) UnmarshalJSON(b []byte) error {
2222
}
2323
return nil
2424
}
25+
2526
func (e *APIError) MarshalJSON() ([]byte, error) {
2627
return json.Marshal(e.f)
2728
}
@@ -41,7 +42,9 @@ func (e APIError) Error() string {
4142
}
4243

4344
// Empty returns true if empty.
44-
func (e APIError) Empty() bool { return e.f != nil }
45+
func (e APIError) Empty() bool {
46+
return e.f == nil
47+
}
4548

4649
func relevantError(httpError error, apiError APIError) error {
4750
if httpError != nil {

0 commit comments

Comments
 (0)