Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAD_REQUEST handling in POST apis #5571

Closed
tbenr opened this issue May 24, 2022 · 1 comment · Fixed by #5576
Closed

BAD_REQUEST handling in POST apis #5571

tbenr opened this issue May 24, 2022 · 1 comment · Fixed by #5576
Assignees

Comments

@tbenr
Copy link
Contributor

tbenr commented May 24, 2022

Seems like we the API framework is not able to generate bad request response when posting wrong\bad JSON

Metadata:

        EndpointMetadata.post(ROUTE)
            .operationId("registerValidator")
            .summary(
                "Provide beacon node with registrations for the given validators to the external builder network.")
            .description(
                "Prepares the beacon node for engaging with external builders."
                    + " The information will be sent by the beacon node to the builder network."
                    + " It is expected that the validator client will send this information periodically"
                    + " to ensure the beacon node has correct and timely registration information"
                    + " to provide to builders. The validator client should not sign blinded beacon"
                    + " blocks that do not adhere to their latest fee recipient and gas limit preferences.")
            .tags(TAG_VALIDATOR, TAG_VALIDATOR_REQUIRED)
            .requestBodyType(
                SIGNED_VALIDATOR_REGISTRATIONS_SCHEMA.getJsonTypeDefinition(),
                SIGNED_VALIDATOR_REGISTRATIONS_SCHEMA::sszDeserialize)
            .response(SC_OK, "Registration information has been received.")
            .withBadRequestResponse(
                Optional.of(
                    "The request could not be processed, check the response for more information."))
            .build());

Integration test:

  @Test
  void shouldReturnBadRequest() throws IOException {
    final SszList<SignedValidatorRegistration> request =
        dataStructureUtil.randomValidatorRegistrations(10);

    Response response = post(PostRegisterValidator.ROUTE, "[{}]");

    assertThat(response.code()).isEqualTo(SC_BAD_REQUEST);
    verifyNoInteractions(validatorApiChannel);
  }
2022-05-24 11:32:53.428+02:00 | qtp1645241964-26 | DEBUG | HttpInput | HttpInputOverHTTP@1b8be71f[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
2022-05-24 11:32:53.428+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=21/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=END,4 of 4},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:65029/eth/v1/validator/register_validator,age=17} parsed false HttpParser{s=END,4 of 4}
2022-05-24 11:32:53.428+02:00 | qtp1645241964-26 | DEBUG | HttpInput | HttpInputOverHTTP@1b8be71f[c=4,q=1,[0]=EOF,s=STREAM] read 4 from Content@7b7c3e07{HeapByteBufferR@3f208f49[p=220,l=220,c=8192,r=0]={POST /eth...\n\r\n[{}]<<<>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00}}
2022-05-24 11:32:53.428+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | releaseRequestBuffer HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=21/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=END,4 of 4},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:65029/eth/v1/validator/register_validator,age=17}
2022-05-24 11:32:53.430+02:00 | qtp1645241964-26 | ERROR | BeaconRestApi | Failed to process request to URL http://localhost:65029/eth/v1/validator/register_validator
tech.pegasys.teku.infrastructure.json.exceptions.MissingRequiredFieldException: required fields: (message, signature) were not set
	at tech.pegasys.teku.infrastructure.json.types.DeserializableObjectTypeDefinition.deserialize(DeserializableObjectTypeDefinition.java:86) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.json.types.DeserializableArrayTypeDefinition.deserialize(DeserializableArrayTypeDefinition.java:56) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.json.types.DeserializableArrayTypeDefinition.deserialize(DeserializableArrayTypeDefinition.java:24) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.json.JsonUtil.parse(JsonUtil.java:96) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.json.JsonUtil.parse(JsonUtil.java:88) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.restapi.openapi.request.SimpleJsonRequestContentTypeDefinition.deserialize(SimpleJsonRequestContentTypeDefinition.java:35) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.restapi.endpoints.EndpointMetadata.getRequestBody(EndpointMetadata.java:140) ~[classes/:?]
	at tech.pegasys.teku.infrastructure.restapi.endpoints.JavalinRestApiRequest.getRequestBody(JavalinRestApiRequest.java:47) ~[classes/:?]
	at tech.pegasys.teku.beaconrestapi.handlers.v1.validator.PostRegisterValidator.handleRequest(PostRegisterValidator.java:102) ~[classes/:?]
	at tech.pegasys.teku.beaconrestapi.MigratingEndpointAdapter.adapt(MigratingEndpointAdapter.java:37) ~[classes/:?]
	at tech.pegasys.teku.beaconrestapi.handlers.v1.validator.PostRegisterValidator.handle(PostRegisterValidator.java:95) ~[classes/:?]
	at io.javalin.core.security.SecurityUtil.noopAccessManager(SecurityUtil.kt:20) ~[javalin-4.4.0.jar:4.4.0]
	at io.javalin.http.JavalinServlet.addHandler$lambda-5(JavalinServlet.kt:115) ~[javalin-4.4.0.jar:4.4.0]
	at io.javalin.http.JavalinServlet$service$tryBeforeAndEndpointHandlers$1.invoke(JavalinServlet.kt:44) ~[javalin-4.4.0.jar:4.4.0]
	at io.javalin.http.JavalinServlet$service$tryBeforeAndEndpointHandlers$1.invoke(JavalinServlet.kt:39) ~[javalin-4.4.0.jar:4.4.0]
	at io.javalin.http.JavalinServlet.service$tryWithExceptionMapper(JavalinServlet.kt:131) ~[javalin-4.4.0.jar:4.4.0]
	at io.javalin.http.JavalinServlet.service$tryBeforeAndEndpointHandlers(JavalinServlet.kt:39) ~[javalin-4.4.0.jar:4.4.0]
	at io.javalin.http.JavalinServlet.service(JavalinServlet.kt:87) ~[javalin-4.4.0.jar:4.4.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
	at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:58) ~[javalin-4.4.0.jar:4.4.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[jetty-servlet-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) ~[jetty-servlet-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at io.javalin.jetty.JettyServer$start$wsAndHttpHandler$1.doHandle(JettyServer.kt:52) ~[javalin-4.4.0.jar:4.4.0]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[jetty-servlet-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-io-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[jetty-io-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[jetty-io-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[jetty-util-9.4.45.v20220203.jar:9.4.45.v20220203]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[jetty-util-9.4.45.v20220203.jar:9.4.45.v20220203]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
2022-05-24 11:32:53.479+02:00 | qtp1645241964-26 | DEBUG | HttpChannelState | unhandle HttpChannelState@201b43de{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0}
2022-05-24 11:32:53.479+02:00 | qtp1645241964-26 | DEBUG | HttpChannelState | nextAction(false) COMPLETE HttpChannelState@201b43de{s=HANDLING rs=COMPLETING os=OPEN is=IDLE awp=false se=false i=false al=0}
2022-05-24 11:32:53.480+02:00 | qtp1645241964-26 | DEBUG | HttpOutput | complete(org.eclipse.jetty.util.Callback$3@1b8aca23) s=CLOSING,api=BLOCKED,sc=false,e=null s=false e=null, c=DirectByteBuffer@47625e15[p=0,l=53,c=32768,r=53]={<<<{"code":500,"message":"An...pected error occurred"}>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00}
2022-05-24 11:32:53.481+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | generate: NEED_HEADER for SendCallback@7868a37f[PROCESSING][i=HTTP/1.1{s=500,h=2,cl=-1},cb=org.eclipse.jetty.server.HttpChannel$SendCallback@15cd8740] (null,[p=0,l=53,c=32768,r=53],true)@START
2022-05-24 11:32:53.482+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | generate: FLUSH for SendCallback@7868a37f[PROCESSING][i=HTTP/1.1{s=500,h=2,cl=-1},cb=org.eclipse.jetty.server.HttpChannel$SendCallback@15cd8740] ([p=0,l=151,c=8192,r=151],[p=0,l=53,c=32768,r=53],true)@COMPLETING
2022-05-24 11:32:53.482+02:00 | qtp1645241964-26 | DEBUG | WriteFlusher | write: WriteFlusher@49d209fb{IDLE}->null [HeapByteBuffer@3daa982d[p=0,l=151,c=8192,r=151]={<<<HTTP/1.1 500 Server Error...y(9.4.45.v20220203)\r\n\r\n>>>: Keep-Al...\x00\x00\x00\x00\x00\x00\x00},DirectByteBuffer@47625e15[p=0,l=53,c=32768,r=53]={<<<{"code":500,"message":"An...pected error occurred"}>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00}]
2022-05-24 11:32:53.482+02:00 | qtp1645241964-26 | DEBUG | WriteFlusher | update WriteFlusher@49d209fb{WRITING}->null:IDLE-->WRITING
2022-05-24 11:32:53.483+02:00 | qtp1645241964-26 | DEBUG | ChannelEndPoint | flushed 204 SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=W,to=75/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=END,4 of 4},g=HttpGenerator@413c9de1{s=COMPLETING}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=HANDLING rs=COMPLETING os=COMMITTED is=IDLE awp=false se=false i=false al=0},r=1,c=false/false,a=HANDLING,uri=//localhost:65029/eth/v1/validator/register_validator,age=72}
2022-05-24 11:32:53.484+02:00 | qtp1645241964-26 | DEBUG | WriteFlusher | Flushed=true written=204 remaining=0 WriteFlusher@49d209fb{WRITING}->null
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | WriteFlusher | update WriteFlusher@49d209fb{IDLE}->null:WRITING-->IDLE
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | generate: DONE for SendCallback@7868a37f[PROCESSING][i=HTTP/1.1{s=500,h=2,cl=-1},cb=org.eclipse.jetty.server.HttpChannel$SendCallback@15cd8740] ([p=151,l=151,c=8192,r=0],[p=53,l=53,c=32768,r=0],true)@END
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | HttpOutput | onWriteComplete(true,null) s=CLOSING,api=BLOCKED,sc=false,e=null->s=CLOSED,api=BLOCKING,sc=false,e=null c=null cb=org.eclipse.jetty.util.Callback$3@1b8aca23 w=false
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | HttpChannelState | completed HttpChannelState@201b43de{s=HANDLING rs=COMPLETING os=COMPLETED is=IDLE awp=false se=false i=false al=0}
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | HttpChannelState | unhandle HttpChannelState@201b43de{s=HANDLING rs=COMPLETED os=COMPLETED is=IDLE awp=false se=false i=false al=0}
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | HttpChannelState | nextAction(false) TERMINATED HttpChannelState@201b43de{s=IDLE rs=COMPLETED os=COMPLETED is=IDLE awp=false se=false i=false al=0}
2022-05-24 11:32:53.485+02:00 | qtp1645241964-26 | DEBUG | HttpChannelState | recycle HttpChannelState@201b43de{s=IDLE rs=COMPLETED os=COMPLETED is=IDLE awp=false se=false i=false al=0}
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | HttpParser | reset HttpParser{s=END,4 of 4}
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | HttpParser | END --> START
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | ChannelEndPoint | filled 0 HeapByteBuffer@3daa982d[p=0,l=0,c=8192,r=0]={<<<>>>HTTP/1.1 ...\x00\x00\x00\x00\x00\x00\x00}
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | ChannelEndPoint | filled 0 HeapByteBuffer@3daa982d[p=0,l=0,c=8192,r=0]={<<<>>>HTTP/1.1 ...\x00\x00\x00\x00\x00\x00\x00}
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=2/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0} filled 0 HeapByteBuffer@3daa982d[p=0,l=0,c=8192,r=0]={<<<>>>HTTP/1.1 ...\x00\x00\x00\x00\x00\x00\x00}
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=2/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0} parse HeapByteBuffer@3daa982d[p=0,l=0,c=8192,r=0]={<<<>>>HTTP/1.1 ...\x00\x00\x00\x00\x00\x00\x00} {}
2022-05-24 11:32:53.487+02:00 | qtp1645241964-26 | DEBUG | HttpParser | parseNext s=START HeapByteBuffer@3daa982d[p=0,l=0,c=8192,r=0]={<<<>>>HTTP/1.1 ...\x00\x00\x00\x00\x00\x00\x00}
2022-05-24 11:32:53.488+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=3/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0} parsed false HttpParser{s=START,0 of -1}
2022-05-24 11:32:53.488+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | releaseRequestBuffer HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=3/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.488+02:00 | qtp1645241964-26 | DEBUG | AbstractConnection | fillInterested HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=-,flush=-,to=3/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.488+02:00 | qtp1645241964-26 | DEBUG | FillInterest | interested FillInterest@29850a2b{AC.ReadCB@44fa87c9{HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=FI,flush=-,to=0/30000}{io=0/0,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}}}
2022-05-24 11:32:53.488+02:00 | qtp1645241964-26 | DEBUG | ChannelEndPoint | changeInterests p=false 0->1 for SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=FI,flush=-,to=0/30000}{io=0/1,kio=0,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.488+02:00 | qtp1645241964-26 | DEBUG | HttpConnection | HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=FI,flush=-,to=0/30000}{io=1/1,kio=1,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0} onFillable exit HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0} null
2022-05-24 11:32:53.489+02:00 | qtp1645241964-21 | DEBUG | ChannelEndPoint | Key interests updated 0 -> 1 on SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=FI,flush=-,to=0/30000}{io=1/1,kio=1,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.525+02:00 | qtp1645241964-21 | DEBUG | AbstractEndPoint | close SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=FI,flush=-,to=37/30000}{io=1/1,kio=1,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.525+02:00 | qtp1645241964-21 | DEBUG | AbstractEndPoint | close(null) SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,OPEN,fill=FI,flush=-,to=37/30000}{io=1/1,kio=1,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.526+02:00 | qtp1645241964-21 | DEBUG | ChannelEndPoint | doClose SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,CLOSED,fill=FI,flush=-,to=37/30000}{io=1/1,kio=1,kro=1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.526+02:00 | qtp1645241964-21 | DEBUG | FillInterest | onClose FillInterest@29850a2b{AC.ReadCB@44fa87c9{HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,CLOSED,fill=FI,flush=-,to=38/30000}{io=1/1,kio=-1,kro=-1}->HttpConnection@44fa87c9[p=HttpParser{s=START,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}}}
2022-05-24 11:32:53.526+02:00 | qtp1645241964-21 | DEBUG | HttpParser | close HttpParser{s=START,0 of -1}
2022-05-24 11:32:53.526+02:00 | qtp1645241964-21 | DEBUG | HttpParser | START --> CLOSE
2022-05-24 11:32:53.527+02:00 | qtp1645241964-21 | DEBUG | AbstractConnection | HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,CLOSED,fill=-,flush=-,to=38/30000}{io=1/1,kio=-1,kro=-1}->HttpConnection@44fa87c9[p=HttpParser{s=CLOSE,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0} onFillInterestedFailed {}
2022-05-24 11:32:53.527+02:00 | qtp1645241964-26 | DEBUG | AbstractConnection | onClose HttpConnection@44fa87c9::SocketChannelEndPoint@734bbbca{l=/127.0.0.1:65029,r=/127.0.0.1:65033,CLOSED,fill=-,flush=-,to=38/30000}{io=1/1,kio=-1,kro=-1}->HttpConnection@44fa87c9[p=HttpParser{s=CLOSE,0 of -1},g=HttpGenerator@413c9de1{s=START}]=>HttpChannelOverHttp@30cf4ec1{s=HttpChannelState@201b43de{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=null,age=0}
2022-05-24 11:32:53.529+02:00 | main | INFO  | Javalin | Stopping Javalin ...
2022-05-24 11:32:53.529+02:00 | main | INFO  | Javalin | Javalin has stopped

org.opentest4j.AssertionFailedError: 
expected: 400
 but was: 500
Expected :400
Actual   :500
<Click to see difference>
@tbenr
Copy link
Contributor Author

tbenr commented May 24, 2022

reference pr: #5545

@rolfyone rolfyone self-assigned this May 24, 2022
rolfyone added a commit to rolfyone/teku that referenced this issue May 25, 2022
- added integration test for PostRegisterValidatorTest, showing invalid data coming in, and a resulting 400.
- had to add a default exception handler for `JsonProcessingException`.

fixes Consensys#5571

Signed-off-by: Paul Harris <[email protected]>
rolfyone added a commit that referenced this issue May 25, 2022
- added integration test for PostRegisterValidatorTest, showing invalid data coming in, and a resulting 400.
- had to add a default exception handler for `JsonProcessingException`.

fixes #5571

Signed-off-by: Paul Harris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants