Raise a specific error when credentials are invalid
Updating spec to verify CredentialError is raised when appropriate.