mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 12:26:01 +08:00
fix(frontend): show backend error detail on project upload failure (#12791)
* fix(frontend): read backend error detail on project upload failure Backend returns error payload under `detail` (FastAPI convention), but the upload handler was reading `message`, producing an empty alert list. Switch to `detail` with `message` and raw-error fallbacks, typed via AxiosError. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(frontend): simplify project upload error handler Revert defensive AxiosError typing; keep direct `detail` read which is sufficient for the upload error path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(frontend): guard upload error handler against missing response --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -168,7 +168,10 @@ const SideBarFoldersButtonsComponent = ({
|
||||
console.error(err);
|
||||
setErrorData({
|
||||
title: t("sidebar.projectUploadError"),
|
||||
list: [err["response"]["data"]["message"]],
|
||||
list: [
|
||||
err?.response?.data?.detail ??
|
||||
(err instanceof Error ? err.message : String(err)),
|
||||
],
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user