mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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:
parent
19bb96bb20
commit
4a0af3abef
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue