Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Commit

Permalink
Include error messaging for HTTP client failures
Browse files Browse the repository at this point in the history
Instead of the default printing only of the URL
  • Loading branch information
gnidan authored Jan 24, 2018
1 parent ceaa439 commit ae15a3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/utils/unbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ae15a3f

Please sign in to comment.