From 9b90c186e6fab0b828f35ec041a4261971f39f32 Mon Sep 17 00:00:00 2001 From: Dmitrii Krasnov Date: Sun, 2 Jun 2019 16:35:40 +0300 Subject: [PATCH] same for handle_message (#50) --- app/commands/base.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/commands/base.rb b/app/commands/base.rb index 3da62b9..25d1353 100644 --- a/app/commands/base.rb +++ b/app/commands/base.rb @@ -21,12 +21,10 @@ def call(message) handle_call(message) when Telegram::Bot::Types::CallbackQuery args = JSON.parse(message.data)['args'] - begin - handle_callback(message, args) - rescue Telegram::Bot::Exceptions::ResponseError => e - logger.error("Error: #{e.message}\n#{e.backtrace.join("\n")}") - end + handle_callback(message, args) end + rescue Telegram::Bot::Exceptions::ResponseError => e + logger.error("Error: #{e.message}\n#{e.backtrace.join("\n")}") end private