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."],[[["This page documents the `ErrorReportingExceptionLoggerMiddleware` class, which is a middleware component designed to handle and report exceptions to the Google Cloud Error Reporting API within ASP.NET Core applications."],["The middleware captures exceptions thrown by the `RequestDelegate`, sends them to the Google Cloud Error Reporting API, and then rethrows the exceptions."],["The `ErrorReportingExceptionLoggerMiddleware` class constructor requires two parameters: `RequestDelegate next`, representing the next request delegate in the pipeline, and `IExceptionLogger logger`, which is responsible for reporting the exceptions."],["The `Invoke` method is the core functionality of this middleware and is responsible for executing the next request delegate, catching any thrown exceptions, reporting these to Google Cloud Error Reporting, and rethrowing the exceptions."],["This document also references the different versions of the api, with the latest being version 5.2.0."]]],[]]