Fetch RPC error descriptions from API
This commit is contained in:
parent
a0ce5c483e
commit
913fc912ee
@ -69,6 +69,12 @@ class RPCErrorException extends \Exception
|
||||
case -429:
|
||||
case 'PEER_FLOOD': $message = 'Too many requests'; break;
|
||||
}
|
||||
if ($this->rpc === $message) {
|
||||
$res = json_decode(file_get_contents('https://rpc.pwrtelegram.xyz/?description_for='.$this->rpc));
|
||||
if ($res['ok']) {
|
||||
$message = $res['result'];
|
||||
}
|
||||
}
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->prettify_tl();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user