{"record":{"id":"95b1fd5fe918f1a3","repo":"Significant-Gravitas/AutoGPT","slug":"login-failed","errorCode":null,"errorMessage":"Login failed","messagePattern":"Login failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"autogpt_platform/frontend/src/app/(no-navbar)/login/useLoginPage.ts","lineNumber":103,"sourceCode":"    setIsLoading(true);\n    setIsLoggingIn(true);\n\n    if (data.email.includes(\"@agpt.co\")) {\n      toast({\n        title: \"Please use Google SSO to login using an AutoGPT email.\",\n        variant: \"default\",\n      });\n\n      setIsLoading(false);\n      setIsLoggingIn(false);\n      return;\n    }\n\n    try {\n      const result = await loginAction(data.email, data.password);\n\n      if (!result.success) {\n        throw new Error(result.error || \"Login failed\");\n      }\n\n      // Use full page navigation to ensure middleware processes the new auth cookies.\n      // router.replace() does a soft navigation where the cookie store may not\n      // immediately reflect cookies set by the server action, causing a blank page.\n      // This matches the OAuth flow which also uses window.location.href.\n      window.location.href = nextUrl || result.next || \"/\";\n    } catch (error) {\n      toast({\n        title:\n          error instanceof Error\n            ? error.message\n            : \"Unexpected error during login\",\n        variant: \"destructive\",\n      });\n\n      setIsLoading(false);\n      setIsLoggingIn(false);","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/frontend/src/app/(no-navbar)/login/useLoginPage.ts#L85-L121","documentation":"NotFoundError raised by reject_transfer (and approve/execute share the pattern) when no TransferRequest row with the given id exists in the database. It is a not-found condition, not a permission or state error.","triggerScenarios":"Calling reject (or approve/execute) with a transfer_id that was deleted, never existed, or contains a typo. Also occurs when the row is filtered by an environment mismatch (pointing at a different DB than the one that created the request).","commonSituations":"Stale transfer list in the frontend referencing a deleted request; copy-paste of an id between dev/staging environments; id truncation in URLs or logs.","solutions":["Verify the transfer_id exists first (GET the transfer) and handle 404 by refreshing the list.","Confirm the backend is pointing at the same database/environment where the transfer was created.","Check the id for whitespace/truncation before sending."],"exampleFix":"# before\nawait reject_transfer(tid, user_id, org_id)\n\n# after\ntr = await get_transfer(tid)  # raises NotFoundError with the same id in the message\nawait reject_transfer(tr.id, user_id, org_id)","handlingStrategy":"validation","validationCode":"tr = await get_transfer(transfer_id)  # raises the same NotFoundError first\n# proceed to reject only with a confirmed id","typeGuard":null,"tryCatchPattern":"try:\n    await reject_transfer(tid, user_id, org_id)\nexcept NotFoundError:\n    refresh_transfer_list()  # id no longer exists","preventionTips":["Verify the id exists before acting on it","Use ids verbatim from a fresh GET, never from logs or other environments","Trim/validate uuid format client-side before sending"],"tags":["transfers","not-found","database"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}