From cb01825320fc1fc49e5fc1cbfc2be2cd676b90d5 Mon Sep 17 00:00:00 2001 From: Aleksander <170264518+t-aleksander@users.noreply.github.com> Date: Fri, 16 Oct 2026 11:30:13 +0200 Subject: [PATCH] error codes --- v2/proxy.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/v2/proxy.proto b/v2/proxy.proto index ffcc6e8..d87652d 100644 --- a/v2/proxy.proto +++ b/v2/proxy.proto @@ -86,6 +86,21 @@ message InitialInfo { message CoreError { int32 status_code = 1; string message = 2; + CoreErrorCode code = 3; +} + +/* + * Reasons for a CoreError. UNSPECIFIED means core sent no code, + * so the proxy falls back to a generic message. + */ +enum CoreErrorCode { + CORE_ERROR_CODE_UNSPECIFIED = 0; + // The user signed in to the identity provider with another account. + CORE_ERROR_CODE_OIDC_ACCOUNT_MISMATCH = 1; + // Core could not verify the identity provider's response. + CORE_ERROR_CODE_OIDC_VERIFICATION_FAILED = 2; + // The MFA session or attempt no longer exists or was already used. + CORE_ERROR_CODE_MFA_SESSION_EXPIRED = 3; } /*