Skip to content

Commit

Permalink
Prettify raw request and response xml
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed Oct 15, 2018
1 parent e9c2eed commit 5d56893
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/objects/response-error.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const pretty = require('pretty');

class ResponseError extends Error {
/**
*
Expand All @@ -15,10 +17,9 @@ class ResponseError extends Error {
if (Error.captureStackTrace) {
Error.captureStackTrace(this, ResponseError);
}

this.result = result;
this.rawResponse = rawResponse;
this.rawRequest = rawRequest;
this.rawResponse = pretty(rawResponse || '');
this.rawRequest = pretty(rawRequest || '');
}
}

Expand Down

0 comments on commit 5d56893

Please sign in to comment.