From af72bcf30d719829973cb3fcbd815eb7cf8422e6 Mon Sep 17 00:00:00 2001 From: pravdomil Date: Wed, 11 Apr 2018 12:24:23 +0200 Subject: [PATCH] finetune error messages --- packages/http/httpcall_client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/http/httpcall_client.js b/packages/http/httpcall_client.js index 788c331d4a..aa1d225602 100644 --- a/packages/http/httpcall_client.js +++ b/packages/http/httpcall_client.js @@ -66,7 +66,7 @@ HTTP.call = function(method, url, options, callback) { if (options.auth) { var colonLoc = options.auth.indexOf(':'); if (colonLoc < 0) - throw new Error('auth option should be of the form "username:password"'); + throw new Error('Option auth should be of the form "username:password"'); username = options.auth.substring(0, colonLoc); password = options.auth.substring(colonLoc+1); } @@ -136,10 +136,10 @@ HTTP.call = function(method, url, options, callback) { Meteor.clearTimeout(timer); if (timed_out) { - callback(new Error("timeout")); + callback(new Error("Connection timeout")); } else if (! xhr.status) { // no HTTP response - callback(new Error("network")); + callback(new Error("Connection lost")); } else { var response = {};