This is a micro-PR to add more detail to error messages.
The way it was:
Before, it showed the error, and the calling function, which is typically just baus.py, the root script which is not super useful for quickly seeing errors in the slack message.
This is because a limit=1 is set on the traceback.extract_tb() method.
This PR
Removing limit=1, we add more detail from stack trace to slack quickly see the originating line / function for errors.
We reverse the stack trace so we get the most relevant one first: the triggering line and the script it is in.
If this becomes too verbose - we could re-introduce the limit, but taken from the opposite of the list.
This is a micro-PR to add more detail to error messages.
The way it was:
limit=1
is set on thetraceback.extract_tb()
method.This PR
limit=1
, we add more detail from stack trace to slack quickly see the originating line / function for errors.