Browse Source

Error should be called err for consistency

err
Luke Childs 8 years ago
parent
commit
2793e7a321
  1. 4
      index.js

4
index.js

@ -171,9 +171,9 @@ function asPromise(opts) {
if (opts.json && res.body) { if (opts.json && res.body) {
try { try {
res.body = JSON.parse(res.body); res.body = JSON.parse(res.body);
} catch (e) { } catch (err) {
if (statusCode >= 200 && statusCode < 300) { if (statusCode >= 200 && statusCode < 300) {
throw new got.ParseError(e, statusCode, opts, data); throw new got.ParseError(err, statusCode, opts, data);
} }
} }
} }

Loading…
Cancel
Save