ncbo / ontologies_api

Hypermedia API for NCBO's ontology-related projects
http://data.bioontology.org
Other
25 stars 10 forks source link

Error output inconsistency #55

Open mdorf opened 5 years ago

mdorf commented 5 years ago

Per a report from a user: when no proper API key is used, you get a result back in the form:

{
    "status": 401,
    "error": "You must provide a valid API Key. Your API Key can be obtained by logging in at bioportal.bioontology.org/account"
}

which is different than the "standard":

{
    "errors": [
        "The search query must be provided via /search?q=<query>[&page=<pagenum>&pagesize=<pagesize>]"
    ],
    "status": 400
}

The correct way is to specify the "errors" as a collection.