# Errors ## ReportErrors `client.errors.reportErrors(ErrorReportErrorsParamsbody, RequestOptionsoptions?): ErrorReportErrorsResponse` **post** `/gitpod.v1.ErrorsService/ReportErrors` ReportErrors allows clients to report batches of errors that will be sent to error reporting systems. The structure is fully compatible with Sentry's event payload format. Use this method to: - Report client-side errors and exceptions - Track application crashes and panics - Send error context and metadata for debugging ### Examples - Report a JavaScript error with Sentry-compatible structure: The service accepts events with comprehensive error information including stack traces, identity context, breadcrumbs, and metadata that align with Sentry's event payload format. ### Parameters - `body: ErrorReportErrorsParams` - `events?: Array` Error events to be reported (batch) - now using Sentry-compatible structure - `breadcrumbs?: Array` Breadcrumbs leading up to the error - `category?: string` Breadcrumb category - `data?: Record` Additional breadcrumb data - `level?: ErrorLevel` Breadcrumb level - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` - `message?: string` Breadcrumb message - `timestamp?: string` When the breadcrumb occurred - `type?: string` Breadcrumb type (e.g., "navigation", "http", "user", "error") - `environment?: string` Environment (e.g., "production", "staging", "development") - `eventId?: string` Unique event identifier (required by Sentry) - `exceptions?: Array` Exception information (primary error data) - `mechanism?: ExceptionMechanism` Exception mechanism - `data?: Record` Additional mechanism-specific data - `description?: string` Human-readable description of the mechanism - `handled?: boolean` Whether the exception was handled by user code - `synthetic?: boolean` Whether this is a synthetic exception (created by SDK) - `type?: string` Type of mechanism (e.g., "generic", "promise", "onerror") - `module?: string` Module or package where the exception type is defined - `stacktrace?: Array` Stack trace frames - `colno?: number` Column number in the line - `contextLine?: string` - `filename?: string` File name or path - `function?: string` Function name - `inApp?: boolean` Whether this frame is in application code (vs library/framework code) - `lineno?: number` Line number in the file - `module?: string` Module or package name - `postContext?: Array` - `preContext?: Array` Source code context around the error line - `vars?: Record` Additional frame-specific variables/locals - `threadId?: string` Thread ID if applicable - `type?: string` Exception type/class name - `value?: string` Exception message/value - `extra?: Record` Additional arbitrary metadata - `fingerprint?: Array` Custom fingerprint for grouping - `identityId?: string` Identity ID of the user (UUID) - `level?: ErrorLevel` Error severity level - `logger?: string` Logger name - `modules?: Record` Modules/dependencies information - `platform?: string` Platform identifier (required by Sentry) - `release?: string` Release version - `request?: RequestInfo` Request information - `data?: string` Request body (truncated if large) - `headers?: Record` Request headers - `method?: string` HTTP method - `queryString?: Record` Query parameters - `url?: string` Request URL - `sdk?: Record` SDK information - `serverName?: string` Server/host name - `tags?: Record` Tags for filtering and grouping - `timestamp?: string` When the event occurred (required by Sentry) - `transaction?: string` Transaction name (e.g., route name, function name) ### Returns - `ErrorReportErrorsResponse = unknown` ReportErrorsResponse confirms that the errors were successfully received Success is indicated by HTTP 200 status code, failures by other status codes Empty response - success indicated by HTTP status code ### Example ```typescript import Gitpod from '@gitpod/sdk'; const client = new Gitpod({ bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted }); const response = await client.errors.reportErrors(); console.log(response); ``` #### Response ```json {} ``` ## Domain Types ### Breadcrumb - `Breadcrumb` Breadcrumb information (Sentry-compatible) - `category?: string` Breadcrumb category - `data?: Record` Additional breadcrumb data - `level?: ErrorLevel` Breadcrumb level - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` - `message?: string` Breadcrumb message - `timestamp?: string` When the breadcrumb occurred - `type?: string` Breadcrumb type (e.g., "navigation", "http", "user", "error") ### Error Event - `ErrorEvent` ErrorEvent contains comprehensive error information (Sentry-compatible) - `breadcrumbs?: Array` Breadcrumbs leading up to the error - `category?: string` Breadcrumb category - `data?: Record` Additional breadcrumb data - `level?: ErrorLevel` Breadcrumb level - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` - `message?: string` Breadcrumb message - `timestamp?: string` When the breadcrumb occurred - `type?: string` Breadcrumb type (e.g., "navigation", "http", "user", "error") - `environment?: string` Environment (e.g., "production", "staging", "development") - `eventId?: string` Unique event identifier (required by Sentry) - `exceptions?: Array` Exception information (primary error data) - `mechanism?: ExceptionMechanism` Exception mechanism - `data?: Record` Additional mechanism-specific data - `description?: string` Human-readable description of the mechanism - `handled?: boolean` Whether the exception was handled by user code - `synthetic?: boolean` Whether this is a synthetic exception (created by SDK) - `type?: string` Type of mechanism (e.g., "generic", "promise", "onerror") - `module?: string` Module or package where the exception type is defined - `stacktrace?: Array` Stack trace frames - `colno?: number` Column number in the line - `contextLine?: string` - `filename?: string` File name or path - `function?: string` Function name - `inApp?: boolean` Whether this frame is in application code (vs library/framework code) - `lineno?: number` Line number in the file - `module?: string` Module or package name - `postContext?: Array` - `preContext?: Array` Source code context around the error line - `vars?: Record` Additional frame-specific variables/locals - `threadId?: string` Thread ID if applicable - `type?: string` Exception type/class name - `value?: string` Exception message/value - `extra?: Record` Additional arbitrary metadata - `fingerprint?: Array` Custom fingerprint for grouping - `identityId?: string` Identity ID of the user (UUID) - `level?: ErrorLevel` Error severity level - `logger?: string` Logger name - `modules?: Record` Modules/dependencies information - `platform?: string` Platform identifier (required by Sentry) - `release?: string` Release version - `request?: RequestInfo` Request information - `data?: string` Request body (truncated if large) - `headers?: Record` Request headers - `method?: string` HTTP method - `queryString?: Record` Query parameters - `url?: string` Request URL - `sdk?: Record` SDK information - `serverName?: string` Server/host name - `tags?: Record` Tags for filtering and grouping - `timestamp?: string` When the event occurred (required by Sentry) - `transaction?: string` Transaction name (e.g., route name, function name) ### Error Level - `ErrorLevel = "ERROR_LEVEL_UNSPECIFIED" | "ERROR_LEVEL_DEBUG" | "ERROR_LEVEL_INFO" | 3 more` Error severity levels (aligned with Sentry levels) - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` ### Exception Info - `ExceptionInfo` Exception information (Sentry-compatible) - `mechanism?: ExceptionMechanism` Exception mechanism - `data?: Record` Additional mechanism-specific data - `description?: string` Human-readable description of the mechanism - `handled?: boolean` Whether the exception was handled by user code - `synthetic?: boolean` Whether this is a synthetic exception (created by SDK) - `type?: string` Type of mechanism (e.g., "generic", "promise", "onerror") - `module?: string` Module or package where the exception type is defined - `stacktrace?: Array` Stack trace frames - `colno?: number` Column number in the line - `contextLine?: string` - `filename?: string` File name or path - `function?: string` Function name - `inApp?: boolean` Whether this frame is in application code (vs library/framework code) - `lineno?: number` Line number in the file - `module?: string` Module or package name - `postContext?: Array` - `preContext?: Array` Source code context around the error line - `vars?: Record` Additional frame-specific variables/locals - `threadId?: string` Thread ID if applicable - `type?: string` Exception type/class name - `value?: string` Exception message/value ### Exception Mechanism - `ExceptionMechanism` Exception mechanism information (Sentry-compatible) - `data?: Record` Additional mechanism-specific data - `description?: string` Human-readable description of the mechanism - `handled?: boolean` Whether the exception was handled by user code - `synthetic?: boolean` Whether this is a synthetic exception (created by SDK) - `type?: string` Type of mechanism (e.g., "generic", "promise", "onerror") ### Request Info - `RequestInfo` Request information (Sentry-compatible) - `data?: string` Request body (truncated if large) - `headers?: Record` Request headers - `method?: string` HTTP method - `queryString?: Record` Query parameters - `url?: string` Request URL ### Stack Frame - `StackFrame` Stack trace frame information (Sentry-compatible) - `colno?: number` Column number in the line - `contextLine?: string` - `filename?: string` File name or path - `function?: string` Function name - `inApp?: boolean` Whether this frame is in application code (vs library/framework code) - `lineno?: number` Line number in the file - `module?: string` Module or package name - `postContext?: Array` - `preContext?: Array` Source code context around the error line - `vars?: Record` Additional frame-specific variables/locals ### Error Report Errors Response - `ErrorReportErrorsResponse = unknown` ReportErrorsResponse confirms that the errors were successfully received Success is indicated by HTTP 200 status code, failures by other status codes Empty response - success indicated by HTTP status code