Expanded debugging

master
Aaron Suen 2021-06-24 22:02:38 -04:00
parent aa7dce4247
commit 425e716d17
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ async function fetch(uri, meth, data, opts, ...rest) {
const resp = await needle(meth, uri, data, opts, ...rest);
if(!/^[23]\d\d/.test(resp.statusCode.toString())) {
const failure = {
method: meth,
uri,
data,
statusCode: resp.statusCode,
statusMessage: resp.statusMessage,
body: resp.body