base: add url to client error message

master
Jonatan Nilsson 2022-10-17 14:12:58 +00:00
parent 2b1e2d695a
commit bcc4dfe745
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ export default class Client {
}
if (!options.getRaw && output.status && typeof(output.status) === 'number') {
let err = new Error(`Request failed [${output.status}]: ${output.message}`)
err.url = path
err.body = output
return reject(err)
}