Skip to content

feat(content-uploader): Implement permission error handling uploads#4580

Merged
mergify[bot] merged 2 commits into
masterfrom
implement-permission-error-handling-uploads
May 29, 2026
Merged

feat(content-uploader): Implement permission error handling uploads#4580
mergify[bot] merged 2 commits into
masterfrom
implement-permission-error-handling-uploads

Conversation

@dealwith
Copy link
Copy Markdown
Collaborator

@dealwith dealwith commented May 20, 2026

5/5 PR in the queue:

  1. feat(uploads-manager): integrate shared feature into ContentUploader #4573
  2. feat(content-uploader): Implement cancel all retry all handlers #4577
  3. feat(content-uploader): Implement cancelled state uploads manager #4578
  4. feat(content-uploader): Implement cancel all confirmation modal #4579
  5. 👉 feat(content-uploader): Implement permission error handling uploads #4580

Summary by CodeRabbit

  • Bug Fixes

    • Improved upload error handling so users see a clear, localized "insufficient permissions" message when they lack permission to upload to a folder.
  • Localization

    • Added a specific localized message for insufficient-permission upload failures.
  • Tests

    • Added/updated tests to verify the new permission-specific error message is displayed.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6666b5b-ea91-4552-96a0-be7a3e2da61d

📥 Commits

Reviewing files that changed from the base of the PR and between 6caedd9 and be7fa97.

📒 Files selected for processing (3)
  • src/api/uploads/MultiputUpload.js
  • src/api/uploads/__tests__/MultiputUpload.test.js
  • src/elements/content-uploader/__tests__/CellRenderer.test.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/api/uploads/tests/MultiputUpload.test.js
  • src/elements/content-uploader/tests/CellRenderer.test.tsx
  • src/api/uploads/MultiputUpload.js

Walkthrough

Adds a new exported error constant and i18n message for upload "insufficient permissions", replaces a hard-coded error string in MultiputUpload with the constant, and updates UI rendering and tests to show the localized permission-denied message.

Changes

Upload insufficient permissions error handling

Layer / File(s) Summary
Error constant and message definition
src/constants.js, src/elements/common/messages.js
Add ERROR_CODE_UPLOAD_INSUFFICIENT_PERMISSIONS = 'access_denied_insufficient_permissions' and uploadsInsufficientPermissionsErrorMessage i18n entry.
API error handling and tests
src/api/uploads/MultiputUpload.js, src/api/uploads/__tests__/MultiputUpload.test.js
Import and compare errorData.code to ERROR_CODE_UPLOAD_INSUFFICIENT_PERMISSIONS in create-session forbidden handling; update tests to use the constant.
UI rendering and tests
src/elements/content-uploader/progressCellRenderer.tsx, src/elements/content-uploader/__tests__/CellRenderer.test.tsx
Import the new constant and add a switch case in getErrorMessage to return uploadsInsufficientPermissionsErrorMessage; add test asserting the permission-denied message renders for that error code.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

ready-to-merge

Suggested reviewers

  • jpan-box
  • olehrybak

Poem

🐰 A tiny constant hops in place,

No more strings to hide its face,
From API to UI it leaps,
Tests awake from restful sleeps,
Permission messages now find their space.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks substantive PR context; it only contains queue position information and template instructions without explaining what changes were made or why. Add a clear explanation of the changes, what problem this solves, and implementation details beyond the template boilerplate.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: implementing permission error handling for uploads with dedicated error messaging.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch implement-permission-error-handling-uploads

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dealwith dealwith changed the base branch from master to implement-cancel-all-confirmation-modal May 21, 2026 09:39
@dealwith dealwith marked this pull request as ready for review May 27, 2026 14:26
@dealwith dealwith requested review from a team as code owners May 27, 2026 14:26
olehrybak
olehrybak previously approved these changes May 27, 2026
reneshen0328
reneshen0328 previously approved these changes May 28, 2026
Comment thread src/elements/content-uploader/__tests__/CellRenderer.test.tsx
Comment thread src/constants.js
@dealwith dealwith force-pushed the implement-cancel-all-confirmation-modal branch from 9cc5b98 to 73dcbd7 Compare May 28, 2026 17:48
@dealwith dealwith requested a review from a team as a code owner May 28, 2026 17:48
@dealwith dealwith force-pushed the implement-permission-error-handling-uploads branch from 61f40f7 to 8f1e793 Compare May 28, 2026 17:54
@dealwith dealwith force-pushed the implement-cancel-all-confirmation-modal branch from 73dcbd7 to e796897 Compare May 28, 2026 19:03
@dealwith dealwith force-pushed the implement-permission-error-handling-uploads branch 2 times, most recently from 85ce4c2 to 3981600 Compare May 28, 2026 19:45
@dealwith dealwith force-pushed the implement-cancel-all-confirmation-modal branch from e796897 to c88db8e Compare May 28, 2026 19:47
@dealwith dealwith force-pushed the implement-permission-error-handling-uploads branch from 3981600 to d975ca1 Compare May 28, 2026 20:09
@dealwith dealwith force-pushed the implement-cancel-all-confirmation-modal branch from 3dd35a9 to 8abe80a Compare May 29, 2026 13:20
@dealwith dealwith force-pushed the implement-permission-error-handling-uploads branch from d975ca1 to 2137f08 Compare May 29, 2026 13:38
@dealwith dealwith changed the base branch from implement-cancel-all-confirmation-modal to master May 29, 2026 14:59
@dealwith dealwith dismissed stale reviews from reneshen0328 and olehrybak May 29, 2026 14:59

The base branch was changed.

Map the 403 access_denied_insufficient_permissions error code to a
distinct, localized message in the upload list error renderer instead of
falling through to the generic Something went wrong copy. Storage limit
errors continue to surface their existing message.
@dealwith dealwith force-pushed the implement-permission-error-handling-uploads branch from 2137f08 to 6caedd9 Compare May 29, 2026 15:10
@dealwith dealwith requested a review from jpan-box May 29, 2026 15:12
@dealwith dealwith requested a review from olehrybak May 29, 2026 15:12
@dealwith dealwith force-pushed the implement-permission-error-handling-uploads branch from 6caedd9 to be7fa97 Compare May 29, 2026 15:21
@dealwith dealwith self-assigned this May 29, 2026
@mergify mergify Bot added the queued label May 29, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 29, 2026

Merge Queue Status

  • Entered queue2026-05-29 15:52 UTC · Rule: Automatic strict merge
  • Checks skipped · PR is already up-to-date
  • Merged2026-05-29 15:53 UTC · at be7fa975b49211cdc22f87bc102805d37150c5cf · squash

This pull request spent 38 seconds in the queue, including 4 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit b14d06a into master May 29, 2026
14 checks passed
@mergify mergify Bot deleted the implement-permission-error-handling-uploads branch May 29, 2026 15:53
@mergify mergify Bot removed the queued label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants