Skip to content

Fix Missing Exception Details in Logs

Choose a tag to compare

@michaelroytman michaelroytman released this 03 Aug 12:13
· 335 commits to master since this release
9eaefb2

The error handler in LtiConsumerXBlock.lti_1p3_launch_callback logs a warning when a select set of exceptions are handled. That log does not contain useful information about the nature of the exception, because the exceptions were not being instantiated with error messages. The try...catch is a large block that contains code that can raise a multitude of errors, so these changes will enable better debugging.

This commit:

  • adds helpful messages to the raised exceptions.
  • adds the exc_info=True argument to include the stack trace of the handled exception.
  • adds ValueError and TypeError to the list of handled exceptions, because the code can raise exceptions of these types.