feat(content-uploader): Implement permission error handling uploads#4580
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| ERROR_CODE_UPLOAD_FAILED_PACKAGE, | ||
| ERROR_CODE_UPLOAD_FILE_SIZE_LIMIT_EXCEEDED, | ||
| ERROR_CODE_UPLOAD_PENDING_APP_FOLDER_SIZE_LIMIT, | ||
| ERROR_CODE_UPLOAD_INSUFFICIENT_PERMISSIONS, |
There was a problem hiding this comment.
alphabetize
INSUFFICIENT_PERMISSIONS should come before PENDING_APP_FOLDER_SIZE_LIMIT. should be between FILE_SIZE_LIMIT_EXCEEDED and PENDING_APP_FOLDER_SIZE_LIMIT.
| export const ERROR_CODE_ITEM_NAME_IN_USE = 'item_name_in_use'; | ||
| export const ERROR_CODE_UPLOAD_FILE_LIMIT = 'upload_file_limit'; | ||
| export const ERROR_CODE_UPLOAD_CHILD_FOLDER_FAILED = 'child_folder_failed_upload'; | ||
| export const ERROR_CODE_UPLOAD_INSUFFICIENT_PERMISSIONS = 'access_denied_insufficient_permissions'; |
There was a problem hiding this comment.
outside of the scope of this pr, but, if you're in here
MultiputUpload.js and its test should probably be updated to use it too.
5/5 PR in the queue: