function friendlyNetworkError(err, text) {
	let help = err.message;
	if (err.code === 'ENOTFOUND') help = `It looks like you're offline.`;
	else if (err.code === 404) help = `Package doesn't exist.`;
	const friendlyErr = Error(`${text}: ${help}`);
	throw Object.assign(friendlyErr, { code: err.code });
}
User-friendly registry/network error messages.
@param {Error & { code: any }} err
@param {string} text