mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
Merge pull request #4874 from overleaf/jpa-web-recurly-unhandled
[web] emit error object instead of string from RecurlyWrapper.apiRequest GitOrigin-RevId: 9fd6cac0b763a438063fdeb1f06bdaa4920024d9
This commit is contained in:
@@ -467,8 +467,10 @@ const RecurlyWrapper = {
|
||||
},
|
||||
'error returned from recurly'
|
||||
)
|
||||
// TODO: this should be an Error object not a string
|
||||
error = `Recurly API returned with status code: ${response.statusCode}`
|
||||
error = new OError(
|
||||
`Recurly API returned with status code: ${response.statusCode}`,
|
||||
{ statusCode: response.statusCode }
|
||||
)
|
||||
}
|
||||
return callback(error, response, body)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user