You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When I receive an invalid body and the pydantic validation fails of the input I would like to have to option to automatically nack the message. For now I'm using the decoder of the route as a workaround. (see below)
Describe the solution you'd like
I don't really know what the best solution would be here, but maybe some more flags for the route would suffice. (Even though I would agree that one wouldn't want to have millions of flags for creating an object)
Feature code example
asyncdef_decoder(message: rabbit.RabbitMessage) ->ServiceInput:
"""Decode message with nack if it fails."""try:
returnServiceInput.model_validate_json(message.body)
exceptpydantic.ValidationErroraserror:
_LOGGER.error(error)
raiseexceptions.NackMessagerabbit.RabbitRoute(
...
decoder=_decoder,
)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When I receive an invalid body and the pydantic validation fails of the input I would like to have to option to automatically nack the message. For now I'm using the
decoder
of the route as a workaround. (see below)Describe the solution you'd like
I don't really know what the best solution would be here, but maybe some more flags for the route would suffice. (Even though I would agree that one wouldn't want to have millions of flags for creating an object)
Feature code example
The text was updated successfully, but these errors were encountered: