public sealed class ErrorReportingExceptionLoggerMiddleware
Middleware that will, when invoked, call the next RequestDelegate,
catch any exception that it may throw, send that exception to the
Google Cloud Error Reporting API and rethrow the given exception.
A logger that will report exceptions. Must not be null.
Methods
Invoke(HttpContext)
public Task Invoke(HttpContext httpContext)
Invokes the next RequestDelegate, catches any exception thrown,
reports the exception to the Google Cloud Error Reporting API and rethrows
the exception.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[[["The `ErrorReportingExceptionLoggerMiddleware` class catches exceptions thrown by the next `RequestDelegate`, reports them to the Google Cloud Error Reporting API, and then rethrows the exception."],["This middleware is part of the `Google.Cloud.Diagnostics.AspNetCore3` namespace and is located within the `Google.Cloud.Diagnostics.AspNetCore3.dll` assembly."],["It includes an `Invoke` method that handles the exception catching and reporting process during request execution using the `HttpContext`."],["The constructor of `ErrorReportingExceptionLoggerMiddleware` requires two parameters: a `RequestDelegate` named `next` and an `IExceptionLogger` named `logger`."],["The latest version of the library that this middleware is part of is 5.2.0, with 4.3.1 being the specific version of the documentation."]]],[]]