arkhn / fhir-river

Live ETL pipeline to standardize Health Data into FHIR.
Apache License 2.0
42 stars 4 forks source link

Preview errors are not catched #720

Closed simonvadee closed 2 years ago

simonvadee commented 2 years ago

Description

When the preview does not succeed (eg: mapping error), an exception is raised. for instance:

fhir-river_river-api.1.uxaqfub11ltl@sandbox1    |   File "./river/extractor/query_builder.py", line 211, in get_column
fhir-river_river-api.1.uxaqfub11ltl@sandbox1    |     raise ImproperMappingError(f"Column '{column.column}' not found in table '{column.table}'.")
fhir-river_river-api.1.uxaqfub11ltl@sandbox1    | river.extractor.errors.ImproperMappingError: Column 'patient_deathdate' not found in table 'osiris_patient'.

The issue is that this issue (and probably many others) are never catched thus resulting in a 500 response by the API (default django response when an exception occurs). Now that the front is ready to properly display API errors, it would be greatly appreciated to have more details than just "500 - internal server error".

Reproduction

Resolution