For tapir, an endpoint that returns code 204 (No Content) must not have any out, regardless of whether the returning data is empty or not. This fix adds a handler for when th stub retusn code 204.
Steps for reproducing
Create a service
curl -X POST $host/api/internal/mockingbird/v2/service \
-d '{"name": "alpha", "suffix": "alpha"}'
The expected behavior is the call returns code 418 with body OK, but in reality it returns nothing, the call fails with timeout, because Mockingbird can handle only specified codes.
Returning 204/304 codes fails
For tapir, an endpoint that returns code 204 (No Content) must not have any out, regardless of whether the returning data is empty or not. This fix adds a handler for when th stub retusn code 204.
Steps for reproducing
The expected behavior is the call returns code 204, but in reality it returns code 500 (Internal Server Error).
Returning arbitrary codes fails, for example 418
The expected behavior is the call returns code 418 with body
OK
, but in reality it returns nothing, the call fails with timeout, because Mockingbird can handle only specified codes.@mockingbird/maintainers