base: add url to client error message

This commit is contained in:
Jonatan Nilsson 2022-10-17 14:12:58 +00:00
parent 2b1e2d695a
commit bcc4dfe745

View file

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