Skip to content

fix: ConfigurationException in fromApiKey#64

Merged
brianquinlan merged 5 commits intogoogleapis:mainfrom
brianquinlan:config_exception
Oct 28, 2025
Merged

fix: ConfigurationException in fromApiKey#64
brianquinlan merged 5 commits intogoogleapis:mainfrom
brianquinlan:config_exception

Conversation

@brianquinlan
Copy link
Copy Markdown
Contributor

@brianquinlan brianquinlan commented Oct 28, 2025

Change fromApiKey to throw ConfigurationException rather than ArgumentError

Depends on googleapis/librarian#2697

Fixes #53

Non-generated changes:

  • **/.sidekick.yaml
  • all the changes in google_cloud_gax

Change `fromApiKey` to throw `ConfigurationException` rather than `ArgumentError`

Depends on googleapis/librarian#2697
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new ConfigurationException to provide more specific error information, which is a good improvement over using the generic ArgumentError. The changes in httpClientFromApiKey for both VM and web platforms are correctly implemented. I have one suggestion to improve the new exception class for better consistency and usability.

@brianquinlan brianquinlan merged commit ff9713a into googleapis:main Oct 28, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throw something other than ArgumentError on fromApiKey failure

2 participants