mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-17 14:50:01 +08:00
Give different error message if family view unlock failed for rate-limit
This commit is contained in:
parent
758b749487
commit
aca375d9da
16
index.js
16
index.js
@ -281,13 +281,25 @@ SteamCommunity.prototype.parentalUnlock = function(pin, callback) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!body || typeof body.success !== 'boolean') {
|
if (!body || typeof body.success !== 'boolean') {
|
||||||
callback("Invalid response");
|
callback("Invalid response");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!body.success) {
|
if (!body.success) {
|
||||||
|
switch (body.eresult) {
|
||||||
|
case 15:
|
||||||
callback("Incorrect PIN");
|
callback("Incorrect PIN");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
callback("Too many invalid PIN attempts");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
callback("Error " + body.eresult);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user