diff --git a/src/handlers.py b/src/handlers.py index 0f21abd..c45e6c3 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -151,7 +151,6 @@ async def handler_print(update: Update, context: ContextTypes.DEFAULT_TYPE): number=requisites[2], ) return - elif r.status_code == 413: await update.message.reply_text( text=ans.file_size_error.format(update.message.document.file_name), @@ -160,7 +159,6 @@ async def handler_print(update: Update, context: ContextTypes.DEFAULT_TYPE): ) logging.warning(f'{log_actor(update)} print api 413 SizeErr') return - elif r.status_code == 415: await update.message.reply_text( text=ans.unreadable_file_error.format(update.message.document.file_name), @@ -169,14 +167,13 @@ async def handler_print(update: Update, context: ContextTypes.DEFAULT_TYPE): ) logging.warning(f'{log_actor(update)} print api 415 UnreadableErr') return - await context.bot.send_message( + else: context.bot.send_message( chat_id=update.effective_user.id, - text=ans.unreadable_file_error, + text=ans.print_err, parse_mode=ParseMode('HTML'), ) logging.warning(f'{log_actor(update)} print unknown error') - @errors_solver @log_formatter async def handler_mismatch_doctype(update: Update, context: ContextTypes.DEFAULT_TYPE):