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