Files
max-bot-api-client-php/tests
Timofey a50e5be823 Skip updates that do not fit their model instead of crashing
#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.
2026-09-28 00:34:08 +05:00
..
2026-07-26 12:56:32 +03:00
2026-04-26 20:28:07 +03:00
2026-04-26 20:28:07 +03:00
2026-04-26 20:28:07 +03:00
2026-07-26 12:56:32 +03:00
2026-04-26 20:28:07 +03:00
2026-04-26 20:28:07 +03:00