aurelio-labs/semantic-router

Re-raise LLM exceptions instead of raising new exception

Opened this issue · 4 comments

In Python, re-raising exceptions (raise instead of raise Exception(e) preserves the original stack trace, helping with debugging.

Change the LLM __call__ exception handling to re-raise errors happening during generation

raise Exception(f"LLM error: {e}")

@bruvduroiu so it should raise instead of raise Exception(e) ?

@simjak yes, raise Exception(e) raises a new exception, thus losing the stack of the original exception

Hey, great project. I'm looking to contribute (and generally getting started with contributing to OS), is this issue still unassigned?

Hey, great project. I'm looking to contribute (and generally getting started with contributing to OS), is this issue still unassigned?

Yes, you could contribute if you can 🙏