DEpt-metagenom / MetagenoMongo

1 stars 2 forks source link

Handle invalid input files #18

Closed gpetho closed 2 months ago

gpetho commented 2 months ago

When the user tries to upload an invalid input file, e.g. the readme.md from the repository, the application crashes with "UnboundLocalError: local variable 'df_temp' referenced before assignment" on this line: https://github.com/DEpt-metagenom/MetagenoMongo/blob/235ccc765a0cabaa7d4ae355b2074b691ce16026/flask-version/metagenomongo/app.py#L140

This should not happen. The user should receive a message that they are trying to upload an invalid file (I suppose that this is the reason why it crashes, I haven't investigated the issue further, just noticed it). The application should not just crash, especially not with an unhelpful error message like this.

iwmstjp commented 2 months ago

This issue was resolved by the following commits: feature: file type check