Added a check for characters which an API key cannot contain (#1227)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-24 17:20:13 +01:00
1 parent c72a1948b3
commit e5a7f5423f
40 files changed
+1179 -71

No files matched your search

@@ -24,6 +24,16 @@ public enum ProviderRequestFailureReason
/// </remarks>
INVALID_OR_MISSING_API_KEY,
/// <summary>
/// The stored API key contains a character which an HTTP header cannot carry, so the request was never sent.
/// </summary>
/// <remarks>
/// Such a key was stored before AI Studio checked keys, or reached the keyring some other way.
/// The provider never saw it, so this is no rejection of its own: the user has to enter the key
/// again, or ask whoever provides it.
/// </remarks>
INVALID_API_KEY_CHARACTERS,
/// <summary>
/// The key was accepted, but the account is not allowed to do what we asked for.
/// </summary>