{"record":{"id":"d615f44ffbf2cac5","repo":"hasura/graphql-engine","slug":"missing-corresponding-value-for-the-cookie-with-co","errorCode":null,"errorMessage":"Missing corresponding value for the cookie with cookie name: {cookie_name}","messagePattern":"Missing corresponding value for the cookie with cookie name: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/auth/hasura-authn-jwt/src/jwt.rs","lineNumber":60,"sourceCode":"        err: serde_json::Error,\n    },\n    #[error(\"Expected string value for claim {claim_name}\")]\n    ClaimMustBeAString { claim_name: String },\n    #[error(\"Required claim {claim_name} not found\")]\n    RequiredClaimNotFound { claim_name: String },\n    #[error(\"JWT Authorization token source: Header name {header_name} not found.\")]\n    AuthorizationHeaderSourceNotFound { header_name: String },\n    #[error(\"JWT Authorization token source: Cookie header not found\")]\n    CookieNotFound,\n    #[error(\n        \"JWT Authorization token source: cookie name {cookie_name} not found in the Cookie header\"\n    )]\n    CookieNameNotFound { cookie_name: String },\n    #[error(\"Error in parsing the {header_name} header: {err}\")]\n    AuthorizationHeaderParseError { err: String, header_name: String },\n    #[error(\"Error in parsing the Cookie header value: {err}\")]\n    CookieParseError { err: cookie::ParseError },\n    #[error(\"Missing corresponding value for the cookie with cookie name: {cookie_name}\")]\n    MissingCookieValue { cookie_name: String },\n    #[error(\"JWT validation error: {0}\")]\n    JWTValidationError(jwt::errors::Error),\n    #[error(\"Internal Error - {0}\")]\n    Internal(#[from] InternalError),\n}\n\nimpl TraceableError for Error {\n    fn visibility(&self) -> ErrorVisibility {\n        // For the purpose of traces, all JWT errors should be developer facing.\n        ErrorVisibility::User\n    }\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum InternalError {\n    #[error(\"Error while constructing the JWT decoding key: {0}\")]\n    JWTDecodingKeyError(jwt::errors::Error),","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/auth/hasura-authn-jwt/src/jwt.rs#L42-L78","documentation":"A cookie with the configured name was found, but its value is empty/missing while extracting the JWT.","triggerScenarios":"The auth cookie exists in the Cookie header but has no value (`name=` or `name`), so the JWT cannot be extracted.","commonSituations":"Logout flow or expired-session code that clears the cookie value but leaves the name; buggy client code setting an empty cookie; race during cookie refresh.","solutions":["Check whether the client is setting the cookie with an empty value (devtools > Application > Cookies)","Fix client/server code that clears the cookie value on logout/expiry instead of deleting it","Treat an empty-value cookie as unauthenticated in your client flow instead of retrying"],"exampleFix":"// before: document.cookie = 'session=';\n// after: document.cookie = 'session=; Max-Age=0'; // properly delete","handlingStrategy":"validation","validationCode":"const value = cookies[config.cookieName];\nif (value === undefined || value === '') return unauthorized('empty auth cookie');","typeGuard":"const hasNonEmptyCookie = (c: Record<string,string>, n: string): boolean => (c[n] ?? '') !== '';","tryCatchPattern":"Treat as unauthenticated (401) and clear/reissue the cookie on next login.","preventionTips":["Delete cookies properly (Max-Age=0) instead of blanking values","Handle logout before requests hit auth"],"tags":["jwt","cookies","auth"],"backgroundTag":"empty-cookie-value","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}