Skip to content

Commit

Permalink
Merge pull request #113 from deepgram/error-fixes
Browse files Browse the repository at this point in the history
just output full error response as stringified JSON
  • Loading branch information
briancbarrow authored Mar 17, 2023
2 parents f965022 + 3fea092 commit e57bb51
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 e57bb51

Please sign in to comment.