mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #35636 from overleaf/tm-fix-export-error-forwarding
[web] Forward v1 export errors to the publish modal instead of a 500 GitOrigin-RevId: 7cf69c4d6a954cd311ac64fff175156b300afabb
This commit is contained in:
@@ -133,9 +133,15 @@ export default ExportsHandler = {
|
||||
{ export: exportData },
|
||||
`v1 export returned failure; forwarding: ${err.body}`
|
||||
)
|
||||
let forwardResponse
|
||||
try {
|
||||
forwardResponse = JSON.parse(err.body)
|
||||
} catch (parseError) {
|
||||
forwardResponse = { status: err.response.status, message: err.body }
|
||||
}
|
||||
// pass the v1 error along for the publish modal to handle
|
||||
throw OError.tag(err, 'v1 export returned failure', {
|
||||
forwardResponse: err.body,
|
||||
forwardResponse,
|
||||
})
|
||||
}
|
||||
throw OError.tag(err, 'error making request to v1 export', {
|
||||
|
||||
Reference in New Issue
Block a user