From ae15a3f3184c6b3f9226f9f62dcac232fdb15f5d Mon Sep 17 00:00:00 2001 From: "g. nicholas d'andrea" Date: Wed, 24 Jan 2018 14:16:03 -0500 Subject: [PATCH] Include error messaging for HTTP client failures Instead of the default printing only of the URL --- lib/utils/unbox.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/unbox.js b/lib/utils/unbox.js index c8662ea..7e20a31 100644 --- a/lib/utils/unbox.js +++ b/lib/utils/unbox.js @@ -39,7 +39,10 @@ function verifyURL(url) { }; request(options, function(error, r) { if (error) { - return reject(new Error("Error making request. Please check the format of the requested resource: " + options.uri)); + return reject(new Error( + "Error making request to " + options.uri + ". Got error: " + error.message + + ". Please check the format of the requested resource." + )); } else if (r.statusCode == 404) { return reject(new Error("Truffle Box at URL " + url + " doesn't exist. If you believe this is an error, please contact Truffle support.")); } else if (r.statusCode != 200) {