Skip to content

Commit

Permalink
just output full error response as stringified JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
briancbarrow committed Mar 17, 2023
1 parent f965022 commit 3fea092
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/httpRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export function _request<T>(

if (dgRes.statusCode && dgRes.statusCode >= 400) {
if (dgResponse.error) {
reject(`DG: ${dgResponse.error}: ${dgResponse.reason}`);
reject(`DG: ${JSON.stringify(dgResponse)}`);
} else {
reject(`DG: ${dgResponse.err_msg}`);
reject(`DG: ${JSON.stringify(dgResponse)}`);
}
}

Expand Down

0 comments on commit 3fea092

Please sign in to comment.