Что с этим делать inline_handler()
Код выдает такую ошибку: aiogram.utils.exceptions.InvalidQueryID: Query is too old and response timeout expired or query id is invalid
@dp.inline_handler()
async def inline_query_handler(query: types.InlineQuery):
query_offset = int(query.offset) if query.offset else 1
search_query = query.query.strip().lower()
film_results = film_all()
filtered_results = [film for film in film_results if search_query in film[1].lower()]
chunk_size = 50
results = [
types.InlineQueryResultArticle(
id=film[0],
title=film[1],
input_message_content=types.InputTextMessageContent(message_text=f'/get_{film[0]}'),
description=film[2],
thumb_url=('https:' + film[3]) if film[3].startswith('//') else film[3]
)
for film in filtered_results[(query_offset-1)*chunk_size:query_offset*chunk_size]
]
next_offset = query_offset + 1 if len(filtered_results) > query_offset * chunk_size else ""
await query.answer(results, is_personal=True, next_offset=str(next_offset))