From a58d57f645032d0dc67bef01d896213056f8f8bc Mon Sep 17 00:00:00 2001 From: Kunal Dawar Date: Fri, 20 Sep 2024 17:27:49 +0530 Subject: [PATCH] Fix linting --- authentication/authentication_error.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authentication/authentication_error.go b/authentication/authentication_error.go index 409ef150..a262c2ed 100644 --- a/authentication/authentication_error.go +++ b/authentication/authentication_error.go @@ -43,7 +43,11 @@ func (a *Error) Error() string { return fmt.Sprintf("%d %s: %s", a.StatusCode, a.Err, a.Message) } +// GetMFAToken returns the MFA token associated with the error, if any. func (a *Error) GetMFAToken() string { + if a == nil || a.MFAToken == "" { + return "" + } return a.MFAToken }