Change: log entire body for http error
This commit is contained in:
parent
c2646c7c1a
commit
bd6dd4b917
|
@ -87,10 +87,9 @@ const tokenManager = (() => {
|
|||
if (r.ok) {
|
||||
return r.json();
|
||||
}
|
||||
return r.json()
|
||||
.catch(console.warn)
|
||||
.then(json => {
|
||||
throw new Error(`failed to fetch (${r.status}): ${json && json.message}`);
|
||||
return r.text()
|
||||
.then(body => {
|
||||
throw new Error(`failed to fetch (${r.status}): ${body}`);
|
||||
});
|
||||
})
|
||||
.then(result =>
|
||||
|
|
Loading…
Reference in New Issue
Block a user