Skip to content

Commit

Permalink
Fix StripeResource to successfully import TIMEOUT_ERROR_CODE.
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinto committed Jan 28, 2022
1 parent f8a05f4 commit dbfb6c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/StripeResource.js
Expand Up @@ -12,7 +12,7 @@ const {
StripeAPIError,
} = require('./Error');

const HttpClient = require('./net/HttpClient');
const {HttpClient} = require('./net/HttpClient');

// Provide extension mechanism for Stripe Resource Sub-Classes
StripeResource.extend = utils.protoExtend;
Expand Down
3 changes: 3 additions & 0 deletions test/StripeResource.spec.js
Expand Up @@ -210,6 +210,9 @@ describe('StripeResource', () => {
}
stripe.charges.create(options.data, (err, result) => {
expect(err.detail.message).to.deep.equal('ETIMEDOUT');
expect(err.message).to.deep.equal(
'Request aborted due to timeout being reached (10ms)'
);
closeServer();
done();
});
Expand Down

0 comments on commit dbfb6c4

Please sign in to comment.