zilla
zilla copied to clipboard
`openapi` `server` binding responds with 4xx HTTP status code for a bad Kafka config
Describe the bug
when the openapi
binding is configured as a server. A message produce POST endpoint can be configured to send a message without an idempotency-key
created. This will produce a message with a null
key value.
In the event a topic is configured such that the key is required, Zilla will get an error from Kafka when it tries to produce and return to the HTTP client with a 4xx error instead of a 5xx error.
To Reproduce Steps to reproduce the behavior:
- Ceate and
openapi
server
binding with a spec that has a POST method that doesn't define an idempotency-key - configure the Kafka topic to be log-compacted
- attempt to send the POST request
- Zilla will fail the request and report a 4xx validation error.
Expected behavior Zilla should create a unique key. And Zilla should report 5xx errors for problems the client cannot fix.