Skip to content

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

@tgwizard

Description

@tgwizard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions