googleapis / googleapis/google-auth-library-ruby
Raise exception with custom class
- Dominant language
- Ruby
- Stars
- 515
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
Currently, if no application default credentials were found, [a RuntimeError](https://github.com/googleapis/google-auth-library-ruby/blob/1c7f3c39d12041c535624aa98dad1d21906835f6/lib/googleauth/application_default.rb#L76) with a constant error message is raised. This should be a custom class instead, so it can be caught in a rescue block.
This pattern is also done in [web_user_authorizer.rb](https://github.com/googleapis/google-auth-library-ruby/blob/6644806ab47cea6d08e1901c2ed808e53a579bc3/lib/googleauth/web_user_authorizer.rb#L161-L162) and [user_authorizer](https://github.com/googleapis/google-auth-library-ruby/blob/6644806ab47cea6d08e1901c2ed808e53a579bc3/lib/googleauth/user_authorizer.rb#L76-L77)
Contributor guide
Assessment
This issue has not been assessed yet.