You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2022/08/29 16:41:00 UTC

[jira] [Commented] (SLING-11248) Post empty body should fail gracefully

    [ https://issues.apache.org/jira/browse/SLING-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17597291#comment-17597291 ] 

Radu Cotescu commented on SLING-11248:
--------------------------------------

Fixed in https://github.com/apache/sling-org-apache-sling-graphql-core/commit/96f11c96c9adaf38db19911f38e4b0a36117a6d3.

> 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: Radu Cotescu
>            Priority: Major
>             Fix For: GraphQL Core 0.0.14
>
>
> 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.
> {noformat}
> 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]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)