Update RPCErrorException.php
This commit is contained in:
parent
7f6481a3fe
commit
a08821404a
@ -42,7 +42,7 @@ class RPCErrorException extends \Exception
|
|||||||
case 'TYPE_CONSTRUCTOR_INVALID': $message = 'The type constructor is invalid'; break;
|
case 'TYPE_CONSTRUCTOR_INVALID': $message = 'The type constructor is invalid'; break;
|
||||||
case 'FILE_PART_INVALID': $message = 'The file part number is invalid'; break;
|
case 'FILE_PART_INVALID': $message = 'The file part number is invalid'; break;
|
||||||
case 'FILE_PARTS_INVALID': $message = 'The number of file parts is invalid'; break;
|
case 'FILE_PARTS_INVALID': $message = 'The number of file parts is invalid'; break;
|
||||||
case 'FILE_PART_Ð¥_MISSING': $message = 'Part X (where X is a number) of the file is missing from storage'; break;
|
case 'FILE_PART_Ð¥_MISSING': $message = 'Part X (where X is a number) of the file is missing from storage'; break;
|
||||||
case 'MD5_CHECKSUM_INVALID': $message = 'The MD5 checksums do not match'; break;
|
case 'MD5_CHECKSUM_INVALID': $message = 'The MD5 checksums do not match'; break;
|
||||||
case 'PHOTO_INVALID_DIMENSIONS': $message = 'The photo dimensions are invalid'; break;
|
case 'PHOTO_INVALID_DIMENSIONS': $message = 'The photo dimensions are invalid'; break;
|
||||||
case 'FIELD_NAME_INVALID': $message = 'The field with the name FIELD_NAME is invalid'; break;
|
case 'FIELD_NAME_INVALID': $message = 'The field with the name FIELD_NAME is invalid'; break;
|
||||||
@ -61,7 +61,7 @@ class RPCErrorException extends \Exception
|
|||||||
case -429: $message = 'Too many requests'; break;
|
case -429: $message = 'Too many requests'; break;
|
||||||
}
|
}
|
||||||
parent::__construct($message, $code, $previous);
|
parent::__construct($message, $code, $previous);
|
||||||
if (in_array($this->rpc, ['CHANNEL_PRIVATE', -404, -429, 'USERNAME_NOT_OCCUPIED', 'ACCESS_TOKEN_INVALID', 'AUTH_KEY_UNREGISTEREDÃ'])) {
|
if (in_array($this->rpc, ['CHANNEL_PRIVATE', -404, -429, 'USERNAME_NOT_OCCUPIED', 'ACCESS_TOKEN_INVALID', 'AUTH_KEY_UNREGISTERED'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strpos($this->rpc, 'FLOOD_WAIT_') !== false) {
|
if (strpos($this->rpc, 'FLOOD_WAIT_') !== false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user