Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Non-standard JSON format on query timeout #113

@MaillPierre

Description

@MaillPierre

I obtain a non-JSON standard response when I send a query that timeout asking for a JSON response.

When querying the following :

PREFIX dcat: <http://www.w3.org/ns/dcat#>
        PREFIX void: <http://rdfs.org/ns/void#>
        ASK {
            SERVICE <http://prod-dekalog.inria.fr/sparql> {
                {
                    BIND(Iri(REPLACE(str(<http://prod-dekalog.inria.fr/sparql>), "http://", "https://")) AS ?endpointUrl)
                    { ?res a dcat:Dataset }
                    UNION { ?res a void:Dataset }
                    UNION { GRAPH ?g { ?res a dcat:Dataset } }
                    UNION { GRAPH ?g { ?res a void:Dataset } }
                    { ?res ?p <http://prod-dekalog.inria.fr/sparql> }
                    UNION { GRAPH ?g { ?res ?p ?endpointUrl } } .
                }
                UNION {
                    BIND(Iri(REPLACE(str(<http://prod-dekalog.inria.fr/sparql>), "https://", "http://")) AS ?endpointUrl)
                    { ?res a dcat:Dataset }
                    UNION { ?res a void:Dataset }
                    UNION { GRAPH ?g { ?res a dcat:Dataset } }
                    UNION { GRAPH ?g { ?res a void:Dataset } }
                    { ?res ?p <http://prod-dekalog.inria.fr/sparql> }
                    UNION { GRAPH ?g { ?res ?p ?endpointUrl } } .
                }
            }
        }

with format=json in the url query, I obtain the following response from the server:

{
<!--
PREFIX dcat: <http://www.w3.org/ns/dcat#>
        PREFIX void: <http://rdfs.org/ns/void#>
        ASK {
            SERVICE <http://prod-dekalog.inria.fr/sparql> {
                {
                    BIND(Iri(REPLACE(str(<http://prod-dekalog.inria.fr/sparql>), "http://", "https://")) AS ?endpointUrl)
                    { ?res a dcat:Dataset }
                    UNION { ?res a void:Dataset }
                    UNION { GRAPH ?g { ?res a dcat:Dataset } }
                    UNION { GRAPH ?g { ?res a void:Dataset } }
                    { ?res ?p <http://prod-dekalog.inria.fr/sparql> }
                    UNION { GRAPH ?g { ?res ?p ?endpointUrl } } .
                }
                UNION {
                    BIND(Iri(REPLACE(str(<http://prod-dekalog.inria.fr/sparql>), "https://", "http://")) AS ?endpointUrl)
                    { ?res a dcat:Dataset }
                    UNION { ?res a void:Dataset }
                    UNION { GRAPH ?g { ?res a dcat:Dataset } }
                    UNION { GRAPH ?g { ?res a void:Dataset } }
                    { ?res ?p <http://prod-dekalog.inria.fr/sparql> }
                    UNION { GRAPH ?g { ?res ?p ?endpointUrl } } .
                }
            }
        }

Service error: http://prod-dekalog.inria.fr/sparql
jakarta.ws.rs.ProcessingException: java.net.SocketTimeoutException: Read timed out
-->
"head": { } ,

"boolean" : false
}

The javascript JSON parser does not recognize this as proper JSON and throws an exception on the first <.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions