Give "Family View Restricted" error if access denied due to Family View

This commit is contained in:
Alexander Corn 2016-06-29 23:08:40 -04:00
parent 303ce10e73
commit 018e18cb5d

View File

@ -92,6 +92,12 @@ SteamCommunity.prototype._checkHttpError = function(err, response, callback) {
return err;
}
if (response.statusCode == 403 && response.body && response.body.match(/<div id="parental_notice_instructions">Enter your PIN below to exit Family View.<\/div>/)) {
err = new Error("Family View Restricted");
callback(err);
return err;
}
if (response.statusCode >= 400) {
err = new Error("HTTP error " + response.statusCode);
err.code = response.statusCode;