mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-12-31 17:17:52 +01:00
Updated errorObject to match TravisCI criteria
This commit is contained in:
parent
6c01d37576
commit
823d340d61
@ -74,11 +74,12 @@ export default function baseRequest(url, { jsonBody, query, urlTemplateSpec, ...
|
||||
// If status is not a 2xx (based on Response.ok), assume it's an error
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fetch
|
||||
if (!(res && res.ok)) {
|
||||
throw {
|
||||
message: "HTTP Error: Couldn't reach requested webpage",
|
||||
status: res.status + " " + res.statusText,
|
||||
let errorObject = {
|
||||
message: 'HTTP Error: Requested page not reachable',
|
||||
status: '${res.status} ${res.statusText}',
|
||||
requestURI: res.url
|
||||
}
|
||||
throw errorObject
|
||||
}
|
||||
return res
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user