Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle an Exception without a traceback. #2248

Merged
merged 1 commit into from Oct 6, 2021

Conversation

kjurka
Copy link
Contributor

@kjurka kjurka commented Oct 3, 2021

When an exception does not have a traceback there are no frames
to filter, but there's an explicit check for the last frame which
will fail if there are no frames.

An example exception with this problem can be seen when using
concurrent.futures.ProcessPoolExecutor. When it reconstitutes a
remote exception it has serialized the traceback to a string it
includes as the error message instead of an object that can be
inspected.

@aenglander
Copy link
Contributor

Please add test to support the change

@davidism davidism added this to the 2.0.2 milestone Oct 6, 2021
When an exception does not have a traceback there are no frames
to filter, but there's an explicit check for the last frame which
will fail if there are no frames.

An example exception with this problem can be seen when using
concurrent.futures.ProcessPoolExecutor.  When it reconstitutes a
remote exception it has serialized the traceback to a string it
includes as the error message instead of an object that can be
inspected.
@davidism davidism force-pushed the handle_exception_wo_traceback branch from 39ec82a to a026095 Compare October 6, 2021 00:12
@davidism davidism changed the base branch from main to 2.0.x October 6, 2021 00:12
@davidism davidism merged commit 9ecd86f into pallets:2.0.x Oct 6, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty response with failure from ProcessPoolExecutor
3 participants