From 82fa89c54dd7b4e0b63054d2dad97509f0ef28c8 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Wed, 8 Apr 2015 23:57:58 +0500 Subject: [PATCH] Fix nested error on json parse --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3e46cca..b3f8bd8 100644 --- a/index.js +++ b/index.js @@ -135,7 +135,7 @@ function got(url, opts, cb) { try { data = JSON.parse(data); } catch (e) { - err = new GotError('Parsing ' + url + ' response failed', err); + err = new GotError('Parsing ' + url + ' response failed', e); } }