diff --git a/lib/util.js b/lib/util.js index 2ac186a..f1eb828 100644 --- a/lib/util.js +++ b/lib/util.js @@ -75,7 +75,7 @@ util.catch = function(caught) { const options = caught.options; const body = _.get(caught, 'response.body', {}); - if (options.uri.includes('/v2.0/')) { + if (caught.response.request.uri.href.includes('/v2.0/')) { throw new errors.SmartcarErrorV2(body); }