mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Use errcheck to find unhandled errors (#795)
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -131,7 +131,10 @@ func (widget *Widget) validateHTTPResponse(responseCode int, body []byte) *hibpE
|
||||
|
||||
switch responseCode {
|
||||
case 401, 402:
|
||||
json.Unmarshal(body, hibpErr)
|
||||
err := json.Unmarshal(body, hibpErr)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
default:
|
||||
hibpErr = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user