zilla icon indicating copy to clipboard operation
zilla copied to clipboard

`openapi` `server` binding responds with 4xx HTTP status code for a bad Kafka config

Open vordimous opened this issue 11 months ago • 0 comments

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:

  1. Ceate and openapi server binding with a spec that has a POST method that doesn't define an idempotency-key
  2. configure the Kafka topic to be log-compacted
  3. attempt to send the POST request
  4. 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.

vordimous avatar Mar 06 '24 21:03 vordimous