MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / AuthError

Enum AuthError

crates/opencode-provider/src/auth.rs:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169#[derive(Debug, thiserror::Error)]
170pub enum AuthError {
171 #[error("OAuth pending request not found for provider: {0}")]
172 OauthMissing(String),
173
174 #[error("OAuth authorization code missing for provider: {0}")]
175 OauthCodeMissing(String),
176
177 #[error("OAuth callback failed")]
178 OauthCallbackFailed,
179
180 #[error("API key not set for provider: {0}")]
181 ApiKeyNotSet(String),
182}
183
184pub fn get_env_key(provider_id: &str) -> Option<String> {
185 let env_var = format!("{}_API_KEY", provider_id.to_uppercase().replace("-", "_"));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected