chembl / chembl_webservices_2

Source code of the ChEMBL web services.
https://www.ebi.ac.uk/chembl/ws
Other
16 stars 3 forks source link

Could the error message in the response had a standard property name? #123

Closed nclopezo closed 7 years ago

nclopezo commented 7 years ago

When the flexmatch search fails the property in the response that has the error message is "error": https://www.ebi.ac.uk/chembl/api/data/molecule.json?molecule_structures__canonical_smiles__flexmatch=5757577yf

But for similarity and substructure search the property is "error_message": https://www.ebi.ac.uk/chembl/api/data/similarity/CHEMBL909090909/80.json?limit=20&offset=0

Could this 2 (and possibly others) error messages have the same property name?

mnowotka commented 7 years ago

Take a look at the error codes. In case of 500 error you get error, 400 gives "error message". In fact, the first case should return 400 as well and I already created an issue for that: https://github.com/chembl/chembl_webservices_2/issues/122. But I see what you mean and I will return error messgae using the same key in both cases.

mnowotka commented 7 years ago

Now it should be "error_message" everywhere.