epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
295 stars 100 forks source link

Server respond with 502 response status instead of 500 or other suitable for error case response. #290

Open ensemenova opened 3 years ago

ensemenova commented 3 years ago

Steps to reproduce:

  1. Send POST request to https://lifescience.opensource.epam.com/v2/indigo/convert with following payload {"struct":"<?xml version=\"1.0\" ?>\n<cml>\n <molecule title=\"\" />\n <Rgroup rgroupID=\"5\">\n <molecule>\n <atomArray>\n <atom id=\"a0\" elementType=\"C\" x2=\"3.8\" y2=\"-1.325\" />\n <atom id=\"a1\" elementType=\"C\" x2=\"3.8\" y2=\"-2.325\" />\n </atomArray>\n <bondArray>\n <bond atomRefs2=\"a0 a1\" order=\"1\" />\n </bondArray>\n </molecule>\n </Rgroup>\n</cml>\n","output_format":"chemical/x-mdl-molfile","options":{"smart-layout":true,"ignore-stereochemistry-errors":true,"mass-skip-error-on-pseudoatoms":false,"gross-formula-add-rsites":true}}

Actual result: 502 Bad Gateway Response status is returned

Expected result: 500 Server error if conversion failed during execution or 400 Bad Request or whatever suitable

ensemenova commented 3 years ago

Please notify Ketcher project when fixed