adsabs/adsabs-dev-api

Syntax error while parsing DOI

Closed this issue · 4 comments

I am trying to look up this DOI: 10.1007/jhep0(.2013)041. This leads to a syntax error when using the API. It leads to an internal error when I use the search field on the web page.

The full error message I receive is (I am using Julia, but the error should be "readable" anyway):

ERROR: HTTP.ExceptionRequest.StatusError(400, "GET", "/v1/search/query?q=doi:10.1007%2Fjhep07%282013%29041&fl=bibcode,citation_count", HTTP.Messages.Response:
"""
HTTP/1.1 400 Bad Request
Date: Tue, 28 Jul 2020 04:00:40 GMT
Content-Type: application/json
Content-Length: 565
Connection: keep-alive
Server: openresty/1.15.8.1
Access-Control-Allow-Origin: http://0.0.0.0:8000, http://adsabs.harvard.edu, http://adsx.cfa.harvard.edu:8888, http://hourly.adslabs.org, http://localhost:8000, http://ui.adsabs.harvard.edu, http://ui.adslabs.org, https://arxiv.org, https://beta.arxiv.org, https://demo.adsabs.harvard.edu, https://dev.adsabs.harvard.edu, https://devui.adsabs.harvard.edu, https://experimental-bumblebee.us-east-1.elasticbeanstalk.com, https://prod.adsabs.harvard.edu, https://staging-bumblebee.elasticbeanstalk.com, https://staging-bumblebee.us-east-1.elasticbeanstalk.com, https://ui.adsabs.harvard.edu
Access-Control-Allow-Methods: DELETE, GET, OPTIONS, POST, PUT
Access-Control-Allow-Headers: Accept, Authorization, Content-Type, Orcid-Authorization, X-BB-Api-Client-Version, X-CSRFToken
Access-Control-Allow-Credentials: true
Vary: Origin
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4823
X-RateLimit-Reset: 1595992737
Retry-After: 83896
Set-Cookie: session=.eJyrVopPK0otzlCyKikqTdVRis9MUbKqVlJIUrJS8gv3LY808i33DffL9qvKrvBzyTb2qwqt8Hfxy_TL9a30c_fKijQKNPB1cbVVqgXqLUgtyk3MS80rgZlWWpxaBDZRycjMxEipFgDRzSOy.Xx-i6A.UtqEVCdOAuRzdIAGbynY5Mjaz3g; Expires=Wed, 28-Jul-2021 10:00:40 GMT; HttpOnly; Path=/

{"responseHeader":{"status":400,"QTime":1,"params":{"q":"doi:10.1007/jhep07(2013)041","fl":"bibcode,citation_count","start":"0","internal_logging_params":"X-Amzn-Trace-Id=Root=1-5f1fa2e8-415e19707bffd2ffa6d5e046","rows":"10","wt":"json"}},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","java.lang.Exception"],"msg":"org.apache.solr.search.SyntaxError: INVALID_SYNTAX_CANNOT_PARSE: Syntax Error, cannot parse doi:10.1007/jhep07(2013)041: The parser reported a syntax error, antlrqueryparser hates errors! ","code":400}}
""")

The DOI I try to resolve is 10.1007/jhep07(2013)041. I don't know how the dot made it into my text above – sorry. The error messages I quote have the correct DOI.

(This DOI is from arxiv.org. The author would have entered it. I don't know whether arxiv.org validates DOIs.)

Thanks for the pointer.