Anthony-Nolan / Atlas

A free & open-source Donor Search Algorithm Service
GNU General Public License v3.0
9 stars 5 forks source link

Return error details if search cannot be run due to bad input data #691

Closed benbelow closed 2 years ago

benbelow commented 2 years ago

e.g. if invalid HLA is provided by the consumer.

Currently this will fail 10 times, and the error message will be "something went wrong in matching algorithm, see AI for logs".

In practice, consumers should not be expected to check AI for expected failure cases - they should be able to know that their input data was incorrect using the traditional user journey.

We should distinguish between "expected" errors (e.g. validation), which should be included in the search result message, and "unexpected" (e.g. connectivity issues), which should not be exposed to consumers, and continue to be logged in AI only.

benbelow commented 2 years ago

Testing image

Validation error message is provided on HLA lookup, is descriptive.

This feature could be better - it will only report the first unrecognised HLA in the input phenotype - if multiple are bad, you woudn't find out except through multiple attempts at the search.

I think that better error messaging is probably beyond MVP, so I'm going to raise a new enhancement card that's not in the wmda mvp epic - as this should give @mmelchers enough info when testing to work out that searches are failing due to bad input data.