Skip to content

fix(templates): handle upload errors properly - #6076

Open
elzody wants to merge 5 commits into
mainfrom
fix/global-template-upload
Open

elzody wants to merge 5 commits into
mainfrom
fix/global-template-upload

Conversation

@elzody

@elzody elzody commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When trying to upload a global template that failed (e.g. file was too large), it would try to detect the MIME type of the file even if it didn't exist, causing a 500 Internal Server Error response. Instead, we should check for errors first, and then try to detect the MIME type only after we know there are no errors.

Assisted-by: ClaudeCode:claude-opus-5

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

@elzody elzody self-assigned this Sep 11, 2026
@elzody
elzody requested a review from juliusknorr as a code owner September 11, 2026 16:00
@elzody elzody added the 3. to review Ready to be reviewed label Sep 11, 2026
@elzody
elzody marked this pull request as draft September 11, 2026 16:16
elzody added 5 commits October 9, 2026 13:12
When trying to upload a global template that failed (e.g. file was too
large), it would try to detect the MIME type of the file even if it
didn't exist, causing a 500 Internal Server Error response. Instead, we
should check for errors first, and then try to detect the MIME type only
after we know there are no errors.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
Distinguish between an upload that failed and an upload that simply
contained nothing

Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
@elzody
elzody force-pushed the fix/global-template-upload branch from b9458a7 to adb16f6 Compare October 9, 2026 17:52
@elzody
elzody marked this pull request as ready for review October 9, 2026 18:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to upload global templates

1 participant