Skip to content

Clarify error: “Cannot wait for updates from inside external…” should mention Bot API calls #148

@gato0x

Description

@gato0x

When using conversation.external(), I encountered errors like:

Cannot wait for updates from inside external, or concurrently to it! Bad replay, expected op 'getFile'

The root cause was that I was making Bot API calls (ctx.api.getFile, ctx.reply, chat actions, etc.) inside the external block. Because external() bypasses the conversation's replay system, these Bot API operations were not being logged. This caused the replay log to go out of sync and triggered the errors.

Suggested Documentation Improvement:

While the current documentation states that external is for "communication with external systems that does not go through grammY," it would be helpful to explicitly clarify that Bot API calls must not be made inside external() blocks.

This clarification would help prevent confusion and make the error messages more immediately understandable for developers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions