freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

PUTting a template without label gives 500 #33

Closed ghsnd closed 9 years ago

ghsnd commented 9 years ago

When you PUT a template without label, it results in a 500 Internal Server Error.

E.g.:

curl -v -d @template.ttl -X PUT -H "Content-Type: application/json" "http://localhost:8080/e-link/templates/3141"

where template.ttl is

{
    "query":" PREFIX geo-pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT { <@@@entity_uri@@@> geo-pos:lat ?lat . <@@@entity_uri@@@> geo-pos:long ?long . } WHERE { <@@@entity_uri@@@> geo-pos:lat ?lat . <@@@entity_uri@@@> geo-pos:long ?long . }",
    "endpoint":"http://factforge.net/sparql",
    "description":"This template find the geo coordinates of a place."
}

results in

{
    "exception": "eu.freme.broker.exception.InternalServerErrorException",
    "path": "/e-link/templates/3141",
    "message": "Unknown problem. Please contact us.",
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": 1440496986637
}

This should be a 400 Bad Request.

m1ci commented 9 years ago

fixed, please check

ghsnd commented 9 years ago

Fixed!