This module provides Error Reporting support for Node.js applications. [Error Reporting](https://cloud.google.com/error-reporting/) is a feature of Google Cloud Platform that allows in-depth monitoring and viewing of errors reported by applications running in almost any environment.
This is the entry point for initializing the error reporting middleware. This function will invoke configuration gathering and attempt to create a API client which will send errors to the Error Reporting Service.
[[["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-09-04 UTC."],[],[],null,["# Class ErrorReporting (3.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.4 (latest)](/nodejs/docs/reference/error-reporting/latest/error-reporting/errorreporting)\n- [3.0.3](/nodejs/docs/reference/error-reporting/3.0.3/error-reporting/errorreporting)\n- [2.0.4](/nodejs/docs/reference/error-reporting/2.0.4/error-reporting/errorreporting) \nThis module provides Error Reporting support for Node.js applications. \\[Error Reporting\\](\u003chttps://cloud.google.com/error-reporting/\u003e) is a feature of Google Cloud Platform that allows in-depth monitoring and viewing of errors reported by applications running in almost any environment.\n\nThis is the entry point for initializing the error reporting middleware. This function will invoke configuration gathering and attempt to create a API client which will send errors to the Error Reporting Service.\n\nmodule:error-reporting\n\n\\[What is Error Reporting\\]\u003chttps://cloud.google.com/error-reporting/\u003e\n\nPackage\n-------\n\n[@google-cloud/error-reporting](../overview.html)\n\nConstructors\n------------\n\n### (constructor)(initConfiguration)\n\n constructor(initConfiguration?: ConfigurationOptions);\n\nConstructs a new instance of the `ErrorReporting` class\n\nProperties\n----------\n\n### event\n\n event: () =\u003e ErrorMessage;\n\n### express\n\n express: (err: {}, req: {}, res: {}, next: Function) =\u003e void;\n\n### hapi\n\n hapi: {\n register: (server: {}, options: {}, next?: Function) =\u003e void;\n name: string;\n version?: string;\n };\n\n### koa\n\n koa: (context: any, next: {}) =\u003e IterableIterator\u003c{}\u003e;\n\n### koa2\n\n koa2: (context: any, next: Function) =\u003e Promise\u003cvoid\u003e;\n\n### report\n\n report: (err: any, request?: manualRequestExtractor.Request, customMessage?: string, callback?: manualInterface.Callback | {} | string) =\u003e ErrorMessage;\n\n### restify\n\n restify: (server: any) =\u003e RestifyRequestHandler | RestifyRequestHandler[];"]]