You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before trying to serialize response from the server
function onNPMversions(err, response, body) {
if (err) {
console.error('ERROR when fetching info for package', name);
return deferred.reject(new Error(err.message));
}
var result = {};
try {
var info = JSON.parse(body);
first check the response. Sometimes the server on WIFI is not allowed to make requests, so it fails badly processing HTML page.
need better response check
If response is not JSON, throw error: "expected JSON response but got HTML response from host: 'n68.network-auth.com' and print contents of the response?
The text was updated successfully, but these errors were encountered:
Before trying to serialize response from the server
first check the response. Sometimes the server on WIFI is not allowed to make requests, so it fails badly processing HTML page.
If response is not JSON, throw error: "expected JSON response but got HTML response from
host: 'n68.network-auth.com'
and print contents of the response?The text was updated successfully, but these errors were encountered: