File Upload Error 1570 - #3369
Open
SunTheDev wants to merge 16 commits into
Open
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
kzsb03
requested changes
Jul 15, 2026
| // proceeding with no attachment. | ||
| if (uploaded.length === 0) { | ||
| const uploadError = new Error( | ||
| "Uploaded file(s) currently in use by another program. Close the program and re-upload the file(s) in a new chat.", |
Contributor
There was a problem hiding this comment.
can we move to support internationalization
|
|
||
| if (isNetworkOrUploadFailure || e instanceof TypeError) { | ||
| toast.error( | ||
| "Uploaded file(s) currently in use by another program. Close the program and re-upload the file(s) in a new chat.", |
…pload_Err-1570
tevanburen
reviewed
Aug 5, 2026
| errMsg.includes("Failed to fetch") || | ||
| errMsg.includes("ERR_FAILED") || | ||
| errMsg.includes("File is in use") || | ||
| errMsg.includes("NetworkError"); |
Contributor
There was a problem hiding this comment.
These won't actually catch the errors we're throwing
| uploadInsight, | ||
| } from "@semoss/sdk/react"; | ||
| import { FlexLayout, type ThemeMap } from "@semoss/shared"; | ||
| import { toast } from "@semoss/ui/next"; |
Contributor
There was a problem hiding this comment.
i don't think we should be using i18n or toast inside the store, i'd prefer to do it in the caller instead
| // Tag and re-throw so awaited callers can also react if needed | ||
| const uploadError = new Error((e as Error).message); | ||
| uploadError.name = "UploadError"; | ||
| (uploadError as Error & { fileNames: string[] }).fileNames = |
Contributor
There was a problem hiding this comment.
no code reads this value
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
…pload_Err-1570
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a user drag-and-drops a Word document (or any file) that is currently open in another program, the upload
silently fails with a net::ERR_FAILED network error — no feedback is shown to the user. This PR adds a clear error toast to match the existing behavior of the file picker path, which already shows a "This file is in use" message in that scenario.
Changes Made
upload failures (TypeError: Failed to fetch / net::ERR_FAILED) and show a toast: "This file is in use. Close the
file in the other program and try again." The toast is raised from the store itself so it fires regardless of
whether askMessage is awaited or called fire-and-forgot (as it is in the new chat flow).
How to Test
the file is not recognized by the chat
Notes
fire-and-forgot with no .catch()) and the existing room flow (room-content.tsx awaits it)
browser received them — this fix brings drag-and-drop to parity with that behavior
ERR_FAILED / NetworkError to cover Chrome, Edge, and Firefox variants