From a4eb37b8d0c58c382a267f3e84476d1b6ef0f08a Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 21 Jul 2017 11:13:54 +0100 Subject: [PATCH] Error should be called `err` for consistency (#347) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 4c5090a..9f9c764 100644 --- a/index.js +++ b/index.js @@ -171,9 +171,9 @@ function asPromise(opts) { if (opts.json && res.body) { try { res.body = JSON.parse(res.body); - } catch (e) { + } catch (err) { if (statusCode >= 200 && statusCode < 300) { - throw new got.ParseError(e, statusCode, opts, data); + throw new got.ParseError(err, statusCode, opts, data); } } }