Skip to content

Commit

Permalink
[connectors] - fix: handle missing error message for large file uploa…
Browse files Browse the repository at this point in the history
…ds (#8865)

- Add default error message for when the file size exceeds the maximum limit and no specific message is provided by the server
  • Loading branch information
JulesBelveze authored Nov 24, 2024
1 parent 0503ded commit c9ce018
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connectors/src/lib/data_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,8 @@ export async function upsertTableFromCsv({
if (dustRequestResult.status === 413) {
throw new TablesError(
"file_too_large",
dustRequestResult.data.error.message
dustRequestResult.data.error?.message ||
"File size exceeds the maximum limit"
);
}
throw new Error(
Expand Down

0 comments on commit c9ce018

Please sign in to comment.