Skip to content

Conversation

@satishk1536
Copy link

@satishk1536 satishk1536 commented Oct 30, 2023

Problem

In some parts of the code, there are attempts to re-raise errors with tracebacks, causing Pythonic errors due to the object being treated as a function, resulting in unusual Usererror behavior.

raise ex_obj.to_user_error(None).with_traceback(
      sys.exc_info()[2],
  )

Solution

The solution to the mentioned problem is to capture the traceback in the log using the logger's exception function and omit the argument.

Testing Done

Unit test done

@satishk1536 satishk1536 force-pushed the dlpx/pr/satishk1536/a8dfb26c-328a-4425-a6b6-ac4081c714e3 branch from 0fc8fb6 to 67e0bad Compare October 30, 2023 04:45
@satishk1536 satishk1536 marked this pull request as ready for review October 30, 2023 09:50
@satishk1536 satishk1536 force-pushed the dlpx/pr/satishk1536/a8dfb26c-328a-4425-a6b6-ac4081c714e3 branch 2 times, most recently from 774627b to 7c3a0eb Compare October 30, 2023 10:08
@satishk1536 satishk1536 force-pushed the dlpx/pr/satishk1536/a8dfb26c-328a-4425-a6b6-ac4081c714e3 branch from 7c3a0eb to a1ac3d0 Compare October 30, 2023 10:11
@satishk1536 satishk1536 enabled auto-merge (squash) October 31, 2023 04:02
@satishk1536 satishk1536 disabled auto-merge October 31, 2023 04:02
@satishk1536 satishk1536 merged commit 38047a3 into develop Oct 31, 2023
@satishk1536 satishk1536 deleted the dlpx/pr/satishk1536/a8dfb26c-328a-4425-a6b6-ac4081c714e3 branch October 31, 2023 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants