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 async 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-03-21 UTC."],[[["This webpage provides documentation for the `ErrorReportingExceptionLoggerMiddleware` class, which is part of the `Google.Cloud.Diagnostics.AspNetCore3` library."],["The `ErrorReportingExceptionLoggerMiddleware` class is middleware that catches exceptions thrown by the next `RequestDelegate`, reports them to the Google Cloud Error Reporting API, and then rethrows the exception."],["The latest version documented is 5.2.0, and other versions including 5.1.0, 5.0.0, 4.4.0, and 4.3.1 are also covered on this page."],["The `Invoke` method of `ErrorReportingExceptionLoggerMiddleware` is used to call the next `RequestDelegate`, catch any thrown exceptions, and report them."],["The constructor of this class, `ErrorReportingExceptionLoggerMiddleware(RequestDelegate next, IExceptionLogger logger)`, takes the next `RequestDelegate` and an `IExceptionLogger` as mandatory parameters to create a new instance."]]],[]]