@uppy/companion: fix 429 not returning JSON response with message (#6177)

discovered by llm
This commit is contained in:
Mikael Finstad 2026-02-09 20:41:26 +08:00 committed by GitHub
parent cb6d42a42f
commit 49db42d72a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@uppy/companion": patch
---
Fix bug with 429 not returning JSON response with message

View file

@ -86,7 +86,7 @@ function errorToResponse(err) {
// @ts-ignore
if (err.statusCode === 429) {
return { code: 429, message: err.message }
return { code: 429, json: { message: err.message } }
}
// @ts-ignore