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
If you set a custom stub to return a 404 response with payload,
response:
status: 404
body: { "foo": "bar" }
Stubby4J doesn't honor it and instead uses the NotFoundResponseHandlingStrategy.
public static StubResponseHandlingStrategy getStrategy(final StubResponse foundStubResponse) {
final HttpStatus.Code httpStatusCode = foundStubResponse.getHttpStatusCode();
switch (httpStatusCode) {
case NOT_FOUND:
return new NotFoundResponseHandlingStrategy();
I think it should at least check if the StubResponse has a body, and if so use the DefaultResponseHandlingStrategy instead.
The text was updated successfully, but these errors were encountered:
If you set a custom stub to return a 404 response with payload,
Stubby4J doesn't honor it and instead uses the
NotFoundResponseHandlingStrategy
.I think it should at least check if the
StubResponse
has a body, and if so use theDefaultResponseHandlingStrategy
instead.The text was updated successfully, but these errors were encountered: