SignInWithChatGPT/SignInWithChatGPTErrors.swift

OpenClawKit · Sources/OpenClawCore/SignInWithChatGPT/SignInWithChatGPTErrors.swift · swift · MIT
auth, Auth / Identity

Defines localized errors for ChatGPT sign-in flows, handling auth failures and state mismatches.

// Source: https://github.com/MarcoDotIO/OpenClawKit | License: MIT | Copyright 2026 OpenClawKit Contributors
// Provided via justclaw.it.com; keep this notice with the code.
import Foundation

/// Errors raised by the Sign in with ChatGPT authorization, token and account flows.
///
/// Messages never include tokens, authorization codes or PKCE verifiers.
public enum SignInWithChatGPTError: Error, LocalizedError, Sendable, Equatable {
    /// The user declined the consent screen (`error=access_denied`). Stop; do not retry automatically.
    case accessDenied
    /// The authorization server returned another `error` on the callback.
    case authorizationFailed(code: String, description: String?)
    /// The callback `state` does not match the pending authorization.
    case stateMismatch
 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key