#GraphQL Server Problem

38 messages · Page 1 of 1 (latest)

fierce otter
#

I am getting an error in Java, when there is empty request sent

- [Tue 02:32:21 ERROR graphql.kickstart.servlet.AbstractGraphQLHttpServlet] Error executing GraphQL request!
graphql.kickstart.servlet.InvocationInputParseException: Request parsing failed
    at FrontierCraft.jar//graphql.kickstart.servlet.HttpRequestHandlerImpl.parseInvocationInput(HttpRequestHandlerImpl.java:72)
    at FrontierCraft.jar//graphql.kickstart.servlet.HttpRequestHandlerImpl.handle(HttpRequestHandlerImpl.java:42)
    at FrontierCraft.jar//graphql.kickstart.servlet.AbstractGraphQLHttpServlet.doRequest(AbstractGraphQLHttpServlet.java:84)
    at FrontierCraft.jar//graphql.kickstart.servlet.AbstractGraphQLHttpServlet.doGet(AbstractGraphQLHttpServlet.java:74)
    at FrontierCraft.jar//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:500)
    at FrontierCraft.jar//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587)
    at FrontierCraft.jar//org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
    at FrontierCraft.jar//org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
    at FrontierCraft.jar//org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:313)
    at FrontierCraft.jar//org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:267)
    at FrontierCraft.jar//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
    at FrontierCraft.jar//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
    at FrontierCraft.jar//org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
    at FrontierCraft.jar//org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
    at FrontierCraft.jar//org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
    at FrontierCraft.jar//org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
    at FrontierCraft.jar//org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1380)
    at FrontierCraf```
elfin cradleBOT
#

This post has been reserved for your question.

Hey @fierce otter! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

fierce otter
#

It happens here and there as well

#

I do not understand because it only happens when i send an empty request to GraphQL without any queries or mutations, I do not know what code to post, because I need to first figure out where is the error happening

elfin cradleBOT
#

<@&765578700724371486>

Requested by Stealth#2507
full shuttle
#

Can you share the relevant code?

#

Request parsing failed
ig that means the request is invalid

#

so maybe don't send empty requests

#

and there should be more to the stack trace

fierce otter
# full shuttle so maybe don't send empty requests

The thing is that i am not trying and even though if i send an empty request i want it to not react to it and throw an exception, right now i cannot share relevant code i will do it later when i am able to. Thank you

elfin cradleBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

fierce otter
full shuttle
#

and where does that send the request?

#

oh, are you receiving an empty request?

fierce otter
#

I dont want that to happen cuz it gets spammy

elfin cradleBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

fierce otter
#

Bump

#

Hello?

full shuttle
fierce otter
full shuttle
fierce otter
#

How do i check if the request is empty in Java and if it is i can just send the error

full shuttle
#

my fault - Can you somehow configure an error handler?

fierce otter
elfin cradleBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

fierce otter
full shuttle
#

maybe in one of the constructors

fierce otter
#

can i ask which contructors?

full shuttle
#

idk

#

I don't use jetty

#

but maybe adding an argument with an error handler to one of the constructors helps

fierce otter