HandleCredentialError determines if given error relates to invalid credential. If it is, the credential is invalidated. Original error is returned untouched.
MaybeInvalidateCredential determines if given error is related to authentication/authorisation failures. If an error is related to an invalid credential, then this call will try to invalidate that credential as well.
ServiceError returns the *azure.ServiceError underlying the supplied error, if any, and a bool indicating whether one was found.