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

If a loader's perform method raises an exception after all promises have been fulfilled, it's silently dropped #162

Open
tgwizard opened this issue Aug 30, 2023 · 0 comments

Comments

@tgwizard
Copy link
Member

See

def resolve #:nodoc:
return if resolved?
load_keys = queue
@queue = nil
around_perform do
perform(load_keys)
end
check_for_broken_promises(load_keys)
rescue => err
reject_pending_promises(load_keys, err)
end

If all promises are fulfilled, then reject_pending_promises will find nowhere to pass err, and it'll be dropped.

I stumbled on a case where this happened due to open-telemetry tracing instrumentation annotating a span with the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant