mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-31 19:40:14 +08:00
Give "Family View Restricted" error if access denied due to Family View
This commit is contained in:
parent
303ce10e73
commit
018e18cb5d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user