[
https://issues.apache.org/jira/browse/SLING-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thierry Ygé updated SLING-11248:
--------------------------------
Description:
We observed following stacktrace, while this is apparently produced by some bot
YandexBot, it seems that if an empty body is sent, it fails with 500, while it
should gracefully fail with 400 instead.
{code:java}
02.04.2022 15:43:06.848 *ERROR* [77.88.5.82 [1648914186845] POST
/content/some_endpoint.json HTTP/1.1]
org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
Throwable
at
org.apache.sling.graphql.core.servlet.QueryParser.fromRequest(QueryParser.java:85)
[org.apache.sling.graphql.core:0.0.12]
at
org.apache.sling.graphql.core.servlet.GraphQLServlet.execute(GraphQLServlet.java:304)
[org.apache.sling.graphql.core:0.0.12]
at
org.apache.sling.graphql.core.servlet.GraphQLServlet.doPost(GraphQLServlet.java:273)
[org.apache.sling.graphql.core:0.0.12]
{code}
was:
We observed following stacktrace, while this is apparently produced by some bot
YandexBot, it seems that if an empty body is sent, it fails with 500, while it
should fail with 400 instead.
{code}
02.04.2022 15:43:06.848 *ERROR* [77.88.5.82 [1648914186845] POST
/content/some_endpoint.json HTTP/1.1]
org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
Throwable
at
org.apache.sling.graphql.core.servlet.QueryParser.fromRequest(QueryParser.java:85)
[org.apache.sling.graphql.core:0.0.12]
at
org.apache.sling.graphql.core.servlet.GraphQLServlet.execute(GraphQLServlet.java:304)
[org.apache.sling.graphql.core:0.0.12]
at
org.apache.sling.graphql.core.servlet.GraphQLServlet.doPost(GraphQLServlet.java:273)
[org.apache.sling.graphql.core:0.0.12]
{code}
> Post empty body should fail gracefully
> --------------------------------------
>
> Key: SLING-11248
> URL: https://issues.apache.org/jira/browse/SLING-11248
> Project: Sling
> Issue Type: Bug
> Components: GraphQL
> Affects Versions: GraphQL Core 0.0.12
> Reporter: Thierry Ygé
> Assignee: Dirk Rudolph
> Priority: Major
>
> We observed following stacktrace, while this is apparently produced by some
> bot YandexBot, it seems that if an empty body is sent, it fails with 500,
> while it should gracefully fail with 400 instead.
> {code:java}
> 02.04.2022 15:43:06.848 *ERROR* [77.88.5.82 [1648914186845] POST
> /content/some_endpoint.json HTTP/1.1]
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
> Throwable
> at
> org.apache.sling.graphql.core.servlet.QueryParser.fromRequest(QueryParser.java:85)
> [org.apache.sling.graphql.core:0.0.12]
> at
> org.apache.sling.graphql.core.servlet.GraphQLServlet.execute(GraphQLServlet.java:304)
> [org.apache.sling.graphql.core:0.0.12]
> at
> org.apache.sling.graphql.core.servlet.GraphQLServlet.doPost(GraphQLServlet.java:273)
> [org.apache.sling.graphql.core:0.0.12]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)