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-09 UTC."],[[["This webpage documents the `ErrorReportingExceptionLoggerMiddleware` class, which is part of the Google Cloud Diagnostics for ASP.NET Core library (version 4.3.1)."],["The `ErrorReportingExceptionLoggerMiddleware` is middleware designed to catch exceptions thrown by the next `RequestDelegate` in the pipeline."],["Upon catching an exception, the middleware sends a report to the Google Cloud Error Reporting API before rethrowing the exception."],["The `ErrorReportingExceptionLoggerMiddleware` constructor takes a `RequestDelegate` and an `IExceptionLogger` as parameters to control the request flow and handle exception reporting."],["The `Invoke` method is used to execute the next `RequestDelegate` in the chain and is responsible for exception handling and reporting to the Google Cloud Error Reporting API, with the method accepting a `HttpContext` parameter."]]],[]]