OpenImaging / miqa-phase1

A web application for medical imaging quality assurance
MIT License
20 stars 8 forks source link

Provide more details to client when encountering errors on import #101

Closed scottwittenburg closed 3 years ago

scottwittenburg commented 3 years ago

Attempt to provide more information to the client when errors are encountered importing data on the server. Sometimes this will be useful, as in this case when the nifti folder doesn't exist:

import_error_more_useful

However, in other cases (e.g. csv file missing columns, etc.), the errors we show the client might not be as intuitive:

import_error_less_useful

scottwittenburg commented 3 years ago

@dchiquito This additionally addresses the issue you discovered and attempted to fix with #100.

If you have ideas on how to make the presentation nicer, please feel free to make suggestions or even push commits to the branch.

aashish24 commented 3 years ago

@scottwittenburg this is great. In the second case, can it not output the fact that this is coming from CSV validation step?

scottwittenburg commented 3 years ago

In the second case, can it not output the fact that this is coming from CSV validation step?

I think that defeats the whole point of this PR. The reason we're showing stack traces to the user (not ideal) is to avoid spending development time at the current juncture trying to catch every possible problem on the server and report it properly.

aashish24 commented 3 years ago

In the second case, can it not output the fact that this is coming from CSV validation step?

I think that defeats the whole point of this PR. The reason we're showing stack traces to the user (not ideal) is to avoid spending development time at the current juncture trying to catch every possible problem on the server and report it properly.

Sure, I agree with that, I was just wondering if there is a an easier way to get more details on the stack trace. Just curiosity, no action needed.

scottwittenburg commented 3 years ago

I was just wondering if there is a an easier way to get more details on the stack trace

Definitely, if you see a way to do this in the PR, please let me know. Another pair of eyes on the code is always useful and appreciated.

aashish24 commented 3 years ago

I know that something like stackprinter exists that can help provide more context and information (https://github.com/cknd/stackprinter) but I am unsure how easy it would be include in this PR (would it be a quick work or not)

dchiquito commented 3 years ago

LGTM