mirror of
https://github.com/safedep/vet.git
synced 2025-12-11 01:01:10 -06:00
#7: Handle potential nil response
This commit is contained in:
parent
8097829f54
commit
115b7e4f0b
@ -46,7 +46,12 @@ func Verify(config *VerifyConfig) error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if resp.JSON200 == nil {
|
||||||
|
return fmt.Errorf("invalid nil response from server")
|
||||||
|
}
|
||||||
|
|
||||||
logger.Infof("Current auth token is valid with expiry: %s",
|
logger.Infof("Current auth token is valid with expiry: %s",
|
||||||
utils.SafelyGetValue(resp.JSON200.Expiry))
|
utils.SafelyGetValue(resp.JSON200.Expiry))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user