#7: Handle potential nil response

This commit is contained in:
abhisek 2023-03-09 23:15:28 +05:30
parent 8097829f54
commit 115b7e4f0b
No known key found for this signature in database
GPG Key ID: CB92A4990C02A88F

View File

@ -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
}