Skip to content

Commit

Permalink
Prepend "Could not <method>" error messages with the message from the…
Browse files Browse the repository at this point in the history
… original error (transloadit#4079)
  • Loading branch information
yaegor authored Sep 1, 2022
1 parent 5b1693d commit d790089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@uppy/companion-client/src/RequestClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class RequestClient {
return (err) => {
if (!err?.isAuthError) {
// eslint-disable-next-line no-param-reassign
err = new ErrorWithCause(`Could not ${method} ${this.#getUrl(path)}`, { cause: err })
err = new ErrorWithCause((err.message ? err.message + ' ' : '') + `Could not ${method} ${this.#getUrl(path)}`, { cause: err })
}
return Promise.reject(err)
}
Expand Down

0 comments on commit d790089

Please sign in to comment.