-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Update 2025-02-08
I need to more robustly handle exceptions in this endpoint.
CASES:
- When a qcop exception does not have e.program_output. E.g., when requesting a TeraChem calculation but TeraChem isn't available in BigChem. fr.get() raises a
qcop.exceptions.ProgramNotFoundError
bute.program_output
is None. SoNone
gets returned to the client as the "result." - Non qcop exceptions such as a parser error. I guess this has more to do with
qcop
properly wrapping upqcparse
errors.
I need to either capture ALL exceptions in qcop
and append a .program_output
object to them, or handle this some other way. I don't love depending on lower packages to not have 500 errors in this endpoint, but otherwise it's a bit hard (impossibel?) to construct a program_output object for the end user because I don't get have the .input_data
unless it's passed up by the underlying programs.
Exceptions raised in qcop
, e.g., sending a "transition_state" calculation to "psi4" which doesn't support it will result in 500 errors because I don't generically handle exceptions on this endpoint.
The issue is that in qcop
I choose to raise certain exceptions upfront before the program
is ever called and do not create exc.program_failure
objects for them. So these exceptions get raised in ChemCloud and I do not have the associated .input_data
to create a proper ProgramFailure
objects.
I think the best fix will be to handle ALL exceptions in qcop
the same way and append a .program_failure
object to them.