mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -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",
|
||||
utils.SafelyGetValue(resp.JSON200.Expiry))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user