Skip to content

Commit 0950c1e

Browse files
authored
fix(dart): Changed docs to ConfigurationException (#2697)
Changes the dartdoc for `fromApiKey` to indicate that `ConfigurationException` can be thrown rather than `ArgumentError `.
1 parent fd6bae4 commit 0950c1e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/sidekick/internal/dart/templates/lib/service.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ final class {{Codec.Name}} {
3939
/// - `{{{.}}}`
4040
{{/Model.Codec.ApiKeyEnvironmentVariables}}
4141
///
42-
/// Throws [ArgumentError] if called without arguments and none of the above
43-
/// environment variables are set.
42+
/// Throws [ConfigurationException] if called without arguments and none of
43+
/// the above environment variables are set. On the web,
44+
/// always throws [ConfigurationException] if called without arguments.
4445
///
4546
/// See [API Keys Overview](https://cloud.google.com/api-keys/docs/overview).
4647
factory {{Codec.Name}}.fromApiKey([String? apiKey]) {

0 commit comments

Comments
 (0)