From 3d241f64b0542b58fd655667022f68763dd4fcd0 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 10 May 2017 11:40:41 +0100 Subject: [PATCH] Less logging --- src/danog/MadelineProto/Exception.php | 2 +- src/danog/MadelineProto/RPCErrorException.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Exception.php b/src/danog/MadelineProto/Exception.php index c44691ee..af61056e 100644 --- a/src/danog/MadelineProto/Exception.php +++ b/src/danog/MadelineProto/Exception.php @@ -29,7 +29,7 @@ class Exception extends \Exception if (in_array($message, ['Re-executing query...', 'I had to recreate the temporary authorization key', 'This peer is not present in the internal peer database', "Couldn't get response", 'Chat forbidden'])) { return; } - if (strpos($message, 'Received request to switch to DC ') !== false || strpos($message, 'Re-executing query...') !== false || strpos($message, "Couldn't find peer by provided") !== false) { + if (strpos($message, 'fwrite') !== false || strpos($message, 'Received request to switch to DC ') !== false || strpos($message, 'Re-executing query...') !== false || strpos($message, "Couldn't find peer by provided") !== false) { return; } \Rollbar\Rollbar::log(\Rollbar\Payload\Level::error(), $this, debug_backtrace(0)); diff --git a/src/danog/MadelineProto/RPCErrorException.php b/src/danog/MadelineProto/RPCErrorException.php index 9f380fcd..04f036d5 100644 --- a/src/danog/MadelineProto/RPCErrorException.php +++ b/src/danog/MadelineProto/RPCErrorException.php @@ -61,7 +61,7 @@ class RPCErrorException extends \Exception case -429: $message = 'Too many requests'; break; } parent::__construct($message, $code, $previous); - if (in_array($this->rpc, ['CHANNEL_PRIVATE', -404, -429, 'USERNAME_NOT_OCCUPIED'])) { + if (in_array($this->rpc, ['CHANNEL_PRIVATE', -404, -429, 'USERNAME_NOT_OCCUPIED', 'ACCESS_TOKEN_INVALID', 'AUTH_KEY_UNREGISTEREDÃ'])) { return; } if (strpos($this->rpc, 'FLOOD_WAIT_') !== false) {