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-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eErrorReportingExceptionLoggerMiddleware\u003c/code\u003e class is a middleware designed to catch exceptions, report them to the Google Cloud Error Reporting API, and then rethrow the exception.\u003c/p\u003e\n"],["\u003cp\u003eThis middleware utilizes a \u003ccode\u003eRequestDelegate\u003c/code\u003e to process the next request in the pipeline and an \u003ccode\u003eIExceptionLogger\u003c/code\u003e to handle the reporting of exceptions.\u003c/p\u003e\n"],["\u003cp\u003eThe middleware's \u003ccode\u003eInvoke\u003c/code\u003e method executes the next \u003ccode\u003eRequestDelegate\u003c/code\u003e, handles any exceptions that arise, and communicates them to the Error Reporting API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this middleware is 4.4.0, and version 4.3.1 is also available for use, both providing the same functionality.\u003c/p\u003e\n"]]],[],null,[]]