Skip to content

Commit

Permalink
catch telegramparam exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateodioev committed Apr 22, 2023
1 parent 76ac0dd commit b34a974
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ private function parseRequestResult(MethodInterface $method): mixed
}
return $returnType::$methodName($this->result['result']);

} catch (TelegramParamException $e) {
throw $e;
} catch (\Throwable) {
return $return[0]::$methodName($this->result);
}
Expand Down

0 comments on commit b34a974

Please sign in to comment.