Closed karr-lab-daemon closed 3 years ago
Fixed handling for reactions that don't have substrates and products in 25b77e9509770dcbfa7425735d919395e9f5563f
Comment from Airbrake: Resolved error reoccurred.
Invalid ebi
API requests causes server error:
{"requestedURL":"https://www.ebi.ac.uk/proteins/api/proteins?offset=0&size=1&gene=N", "errorMessage":["gene parameter size should be between 3 and 50"]}
The error is because we're sending an invalid request to the EBI's API. I fixed this by switching to a more reliable method. Rather than retrieving UniProt entries by gene name (which are not unique), we can retrieve UniProt entries by KO id.
Comment from Airbrake: Resolved error reoccurred.
This now appears to be due to intermittent failures of the REST API on these endpoints
https://api.datanator.info/ftx/text_search/num_of_index/?query_message=XIRNKXNNONJFQO-UHFFFAOYSA-N&index=sabio_reaction_entries&from_=0&size=10&fields=rxn_id&fields=ec-code&fields=enzyme_names&fields=product_names&fields=products&fields=substrate_names&fields=substrates&fields=in_metabolites
https://api.datanator.info/ftx/text_search/num_of_index/?index=metabolites_meta&query_message=beta galactosidase&from_=0&size=10&fields=inchi&fields=InChI_Key&fields=smiles&fields=chemical_formula&fields=name&fields=synonyms&fields=description&fields=biocyc_id&fields=cas_registry_number&fields=chebi_id&fields=chemspider_id&fields=kegg_id&fields=pubchem_compound_id&fields=pathways.pathway.name&fields=pathways.pathway.kegg_map_id&includes=InChI_Key&includes=name&includes=chebi_id
Airbrake error: #3696 Airbrake project: datanator_frontend
Error type:
Error
Error message:Request failed with status code 400
Where:<no information>
Occurred at: Aug 01, 2020 10:22:23 UTC First seen at: Aug 01, 2020 10:22:23 UTC Occurrences: 0 (0 since last deploy on Jul 27, 2020 13:19:40 UTC) Severity:error
URL: https://datanator.info/reaction/data/ File:
https://datanator.info/static/node_modules/axios/lib/core/createError.js
Backtrace: