stsievert / salmon

A tool to collect triplet queries
https://docs.stsievert.com/salmon/
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

MAINT: propogate errors on file upload #13

Closed stsievert closed 4 years ago

stsievert commented 4 years ago

What does this PR implement? It propagates errors on encountered during file upload. This is provides the experimentalists with more context than "500: internal service error". For example, for the error behind #12 it shows this text on file upload:

Error!

Summary:

<class 'yaml.scanner.ScannerError'> while scanning for the next token
found character '\t' that cannot start any token
  in "<byte string>", line 2, column 4:
      - Above
       ^

Full traceback:

  File "/opt/conda/bin/uvicorn", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
...

Reference issues/PRs This PR will close #12.