Skip to content

OnRequestCompleted doesn't work if ThrowExceptions is enabled #1904

Closed
@TioLuiso

Description

@TioLuiso

Title says it all. What I expected is that OnRequestCompleted would handle all completed requests, successful and failed. But if ThrowExceptions is enabled, the exception throwing takes place before calling OnRequestCompleted, which defeats the purpose of having a tracing handler.

I checked on your code.

Transport.Request calls

if (response == null || !response.Success)
  pipeline.BadResponse(ref response, requestData, seenExceptions);

this.Settings.OnRequestCompleted?.Invoke(response);

Would it be a really big problem if you changed the order to call OnRequestCompleted before and not after?

Thanks a huge lot

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