Skip to content

Display API error messages during image upload#3227

Merged
david-crespo merged 1 commit into
mainfrom
image-upload-api-errors
May 22, 2026
Merged

Display API error messages during image upload#3227
david-crespo merged 1 commit into
mainfrom
image-upload-api-errors

Conversation

@david-crespo
Copy link
Copy Markdown
Collaborator

Closes #1859. Will merge this into main and then merge main into #3222.

image

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview May 22, 2026 9:36pm

Request Review

@david-crespo david-crespo enabled auto-merge (squash) May 22, 2026 21:36
Comment thread mock-api/msw/util.ts
json({ error_code: 'InvalidRequest', message }, { status: 400 })

export const internalError = (message: string) =>
json({ error_code: 'InternalError', message }, { status: 500 })
Copy link
Copy Markdown
Collaborator Author

@david-crespo david-crespo May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out InternalError was wrong, and we need it to be correct because we're adding client logic in this PR that is conditional on error_code !== 'Internal'.

@david-crespo david-crespo merged commit 337b4e8 into main May 22, 2026
7 checks passed
@david-crespo david-crespo deleted the image-upload-api-errors branch May 22, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update error message when attempting to upload an image

1 participant