Skip to content

Silent mode for errors of unsupported event types #15 - #17

Merged
BushlanovDev merged 3 commits into
masterfrom
i15
Dec 4, 2025
Merged

BushlanovDev merged 3 commits into
masterfrom
i15

Conversation

@BushlanovDev

Copy link
Copy Markdown
Owner

No description provided.

@BushlanovDev BushlanovDev linked an issue Dec 1, 2025 that may be closed by this pull request
@BushlanovDev
BushlanovDev merged commit 2ecb5c7 into master Dec 4, 2025
8 checks passed
@BushlanovDev
BushlanovDev deleted the i15 branch December 4, 2025 06:30
BushlanovDev pushed a commit that referenced this pull request Sep 30, 2026
#17 made unsupported update types silent: createUpdate() throws a
LogicException, and createUpdateList() and WebhookHandler log it and
skip the update. An update of a known type whose payload no longer
fits the model (the API made a field optional, added an enum value)
fails earlier, with a TypeError or ValueError from the model
constructor, and nothing catches those:

- createUpdateList() lets it out of getUpdates(), and
  LongPollingHandler::handle() catches only \Exception, so the loop
  stops and restarts into the same batch
- WebhookHandler answers 500 and MAX keeps retrying

createUpdate() now turns TypeError and ValueError into a
LogicException (the original one kept as previous) and logs a warning
with the payload, so the existing silent mode skips such an update.
Errors thrown by user handlers are not affected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Нет поддержки многих типов событий

1 participant