Skip to content

Commit

Permalink
feat: Improve storage quota errors (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkudryaev authored Oct 24, 2024
1 parent dc442e5 commit 3befdd0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@changesets/cli": "^2.27.6",
"@fleek-platform/errors": "^2.5.1",
"@fleek-platform/errors": "^2.7.0",
"@fleek-platform/tester": "^2.11.0",
"@fleek-platform/utils-genql-client": "^0.1.1",
"@fleek-platform/utils-token": "^0.2.0",
Expand Down
11 changes: 9 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/clients/uploadProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ const fetchWithValidStatus = async ({
});

if (error.code === "DailyUploadedTotalSizeQuotaExceeded") {
throw new StorageUploadTotalSizeQuotaExceededError();
throw new StorageUploadTotalSizeQuotaExceededError(error.data);
} else if (error.code === "DailyUploadedFilesQuotaExceeded") {
throw new StorageUploadFileCountQuotaExceededError();
throw new StorageUploadFileCountQuotaExceededError(error.data);
} else if (error.code === "FolderNotFoundError" && parentFolderId) {
throw new FolderNotFoundError({ folder: { id: parentFolderId } });
} else {
Expand Down

0 comments on commit 3befdd0

Please sign in to comment.