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
The error handler consumes an HttpRequest<?> but then expects it to be one of CredentialsWithoutNullabilityAnnotation, CredentialsWithNullable, or CredentialsWithNonNull. While these are the bodies that are supposed to be consumed by original operations (non error-handlers), I don't see a particular reason why they should be provided to the error handler.
Since the original operations bind the bodies first, a way of fixing this would be to store this body when it is bound:
This does not seem like a good solution, though and I think the TCK should be changed unless this is documented behavior. Something like this would be sufficient in this case:
This PR adds Micronaut Server TCK for Oracle Cloud Function HTTP.
Currently, 10 of 188 tests (5%) fail.
Fixes:
* Making the request implementation mutable to support filters.
* Allow empty response when an exception is thrown micronaut-servlet#737
* Add support for parsing form data and support empty values in the form data.
* Support binding publisher when there is only one element.
* Support binding body parts for JSON case (so binding JSON properties).
* Fix reading cookies from headers.
Created issues:
Function Server TCK: Body has already been consumed exception #921
Function Server TCK: ControllerConstraintHandlerTest failing because of getBody() #925
Function Server TCK: RequestFilterTest failing #926
Issue description
The Server TCK was added in this PR: #920.
Currently some of the ControllerConstraintHandlerTest is failing.
The reason for failure are these lines: https://github.com/micronaut-projects/micronaut-core/blob/39818ada8f3cabbe17ee4d61e19e13e4e0d1fef4/http-server-tck/src/main/java/io/micronaut/http/server/tck/tests/constraintshandler/ControllerConstraintHandlerTest.java#L180-L196
The error handler consumes an
HttpRequest<?>
but then expects it to be one ofCredentialsWithoutNullabilityAnnotation
,CredentialsWithNullable
, orCredentialsWithNonNull
. While these are the bodies that are supposed to be consumed by original operations (non error-handlers), I don't see a particular reason why they should be provided to the error handler.Since the original operations bind the bodies first, a way of fixing this would be to store this body when it is bound:
This does not seem like a good solution, though and I think the TCK should be changed unless this is documented behavior. Something like this would be sufficient in this case:
cc @graemerocher @yawkat
The text was updated successfully, but these errors were encountered: