# Errors ## ReportErrors `errors.report_errors(ErrorReportErrorsParams**kwargs) -> object` **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 - `events: Optional[Iterable[ErrorEventParam]]` Error events to be reported (batch) - now using Sentry-compatible structure - `breadcrumbs: Optional[List[Breadcrumb]]` Breadcrumbs leading up to the error - `category: Optional[str]` Breadcrumb category - `data: Optional[Dict[str, str]]` Additional breadcrumb data - `level: Optional[ErrorLevel]` Breadcrumb level - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` - `message: Optional[str]` Breadcrumb message - `timestamp: Optional[datetime]` When the breadcrumb occurred - `type: Optional[str]` Breadcrumb type (e.g., "navigation", "http", "user", "error") - `environment: Optional[str]` Environment (e.g., "production", "staging", "development") - `event_id: Optional[str]` Unique event identifier (required by Sentry) - `exceptions: Optional[List[ExceptionInfo]]` Exception information (primary error data) - `mechanism: Optional[ExceptionMechanism]` Exception mechanism - `data: Optional[Dict[str, str]]` Additional mechanism-specific data - `description: Optional[str]` Human-readable description of the mechanism - `handled: Optional[bool]` Whether the exception was handled by user code - `synthetic: Optional[bool]` Whether this is a synthetic exception (created by SDK) - `type: Optional[str]` Type of mechanism (e.g., "generic", "promise", "onerror") - `module: Optional[str]` Module or package where the exception type is defined - `stacktrace: Optional[List[StackFrame]]` Stack trace frames - `colno: Optional[int]` Column number in the line - `context_line: Optional[str]` - `filename: Optional[str]` File name or path - `function: Optional[str]` Function name - `in_app: Optional[bool]` Whether this frame is in application code (vs library/framework code) - `lineno: Optional[int]` Line number in the file - `module: Optional[str]` Module or package name - `post_context: Optional[List[str]]` - `pre_context: Optional[List[str]]` Source code context around the error line - `vars: Optional[Dict[str, str]]` Additional frame-specific variables/locals - `thread_id: Optional[str]` Thread ID if applicable - `type: Optional[str]` Exception type/class name - `value: Optional[str]` Exception message/value - `extra: Optional[Dict[str, str]]` Additional arbitrary metadata - `fingerprint: Optional[List[str]]` Custom fingerprint for grouping - `identity_id: Optional[str]` Identity ID of the user (UUID) - `level: Optional[ErrorLevel]` Error severity level - `logger: Optional[str]` Logger name - `modules: Optional[Dict[str, str]]` Modules/dependencies information - `platform: Optional[str]` Platform identifier (required by Sentry) - `release: Optional[str]` Release version - `request: Optional[RequestInfo]` Request information - `data: Optional[str]` Request body (truncated if large) - `headers: Optional[Dict[str, str]]` Request headers - `method: Optional[str]` HTTP method - `query_string: Optional[Dict[str, str]]` Query parameters - `url: Optional[str]` Request URL - `sdk: Optional[Dict[str, str]]` SDK information - `server_name: Optional[str]` Server/host name - `tags: Optional[Dict[str, str]]` Tags for filtering and grouping - `timestamp: Optional[datetime]` When the event occurred (required by Sentry) - `transaction: Optional[str]` Transaction name (e.g., route name, function name) ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.errors.report_errors() print(response) ``` #### Response ```json {} ``` ## Domain Types ### Breadcrumb - `class Breadcrumb: …` Breadcrumb information (Sentry-compatible) - `category: Optional[str]` Breadcrumb category - `data: Optional[Dict[str, str]]` Additional breadcrumb data - `level: Optional[ErrorLevel]` Breadcrumb level - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` - `message: Optional[str]` Breadcrumb message - `timestamp: Optional[datetime]` When the breadcrumb occurred - `type: Optional[str]` Breadcrumb type (e.g., "navigation", "http", "user", "error") ### Error Event - `class ErrorEvent: …` ErrorEvent contains comprehensive error information (Sentry-compatible) - `breadcrumbs: Optional[List[Breadcrumb]]` Breadcrumbs leading up to the error - `category: Optional[str]` Breadcrumb category - `data: Optional[Dict[str, str]]` Additional breadcrumb data - `level: Optional[ErrorLevel]` Breadcrumb level - `"ERROR_LEVEL_UNSPECIFIED"` - `"ERROR_LEVEL_DEBUG"` - `"ERROR_LEVEL_INFO"` - `"ERROR_LEVEL_WARNING"` - `"ERROR_LEVEL_ERROR"` - `"ERROR_LEVEL_FATAL"` - `message: Optional[str]` Breadcrumb message - `timestamp: Optional[datetime]` When the breadcrumb occurred - `type: Optional[str]` Breadcrumb type (e.g., "navigation", "http", "user", "error") - `environment: Optional[str]` Environment (e.g., "production", "staging", "development") - `event_id: Optional[str]` Unique event identifier (required by Sentry) - `exceptions: Optional[List[ExceptionInfo]]` Exception information (primary error data) - `mechanism: Optional[ExceptionMechanism]` Exception mechanism - `data: Optional[Dict[str, str]]` Additional mechanism-specific data - `description: Optional[str]` Human-readable description of the mechanism - `handled: Optional[bool]` Whether the exception was handled by user code - `synthetic: Optional[bool]` Whether this is a synthetic exception (created by SDK) - `type: Optional[str]` Type of mechanism (e.g., "generic", "promise", "onerror") - `module: Optional[str]` Module or package where the exception type is defined - `stacktrace: Optional[List[StackFrame]]` Stack trace frames - `colno: Optional[int]` Column number in the line - `context_line: Optional[str]` - `filename: Optional[str]` File name or path - `function: Optional[str]` Function name - `in_app: Optional[bool]` Whether this frame is in application code (vs library/framework code) - `lineno: Optional[int]` Line number in the file - `module: Optional[str]` Module or package name - `post_context: Optional[List[str]]` - `pre_context: Optional[List[str]]` Source code context around the error line - `vars: Optional[Dict[str, str]]` Additional frame-specific variables/locals - `thread_id: Optional[str]` Thread ID if applicable - `type: Optional[str]` Exception type/class name - `value: Optional[str]` Exception message/value - `extra: Optional[Dict[str, str]]` Additional arbitrary metadata - `fingerprint: Optional[List[str]]` Custom fingerprint for grouping - `identity_id: Optional[str]` Identity ID of the user (UUID) - `level: Optional[ErrorLevel]` Error severity level - `logger: Optional[str]` Logger name - `modules: Optional[Dict[str, str]]` Modules/dependencies information - `platform: Optional[str]` Platform identifier (required by Sentry) - `release: Optional[str]` Release version - `request: Optional[RequestInfo]` Request information - `data: Optional[str]` Request body (truncated if large) - `headers: Optional[Dict[str, str]]` Request headers - `method: Optional[str]` HTTP method - `query_string: Optional[Dict[str, str]]` Query parameters - `url: Optional[str]` Request URL - `sdk: Optional[Dict[str, str]]` SDK information - `server_name: Optional[str]` Server/host name - `tags: Optional[Dict[str, str]]` Tags for filtering and grouping - `timestamp: Optional[datetime]` When the event occurred (required by Sentry) - `transaction: Optional[str]` Transaction name (e.g., route name, function name) ### Error Level - `Literal["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 - `class ExceptionInfo: …` Exception information (Sentry-compatible) - `mechanism: Optional[ExceptionMechanism]` Exception mechanism - `data: Optional[Dict[str, str]]` Additional mechanism-specific data - `description: Optional[str]` Human-readable description of the mechanism - `handled: Optional[bool]` Whether the exception was handled by user code - `synthetic: Optional[bool]` Whether this is a synthetic exception (created by SDK) - `type: Optional[str]` Type of mechanism (e.g., "generic", "promise", "onerror") - `module: Optional[str]` Module or package where the exception type is defined - `stacktrace: Optional[List[StackFrame]]` Stack trace frames - `colno: Optional[int]` Column number in the line - `context_line: Optional[str]` - `filename: Optional[str]` File name or path - `function: Optional[str]` Function name - `in_app: Optional[bool]` Whether this frame is in application code (vs library/framework code) - `lineno: Optional[int]` Line number in the file - `module: Optional[str]` Module or package name - `post_context: Optional[List[str]]` - `pre_context: Optional[List[str]]` Source code context around the error line - `vars: Optional[Dict[str, str]]` Additional frame-specific variables/locals - `thread_id: Optional[str]` Thread ID if applicable - `type: Optional[str]` Exception type/class name - `value: Optional[str]` Exception message/value ### Exception Mechanism - `class ExceptionMechanism: …` Exception mechanism information (Sentry-compatible) - `data: Optional[Dict[str, str]]` Additional mechanism-specific data - `description: Optional[str]` Human-readable description of the mechanism - `handled: Optional[bool]` Whether the exception was handled by user code - `synthetic: Optional[bool]` Whether this is a synthetic exception (created by SDK) - `type: Optional[str]` Type of mechanism (e.g., "generic", "promise", "onerror") ### Request Info - `class RequestInfo: …` Request information (Sentry-compatible) - `data: Optional[str]` Request body (truncated if large) - `headers: Optional[Dict[str, str]]` Request headers - `method: Optional[str]` HTTP method - `query_string: Optional[Dict[str, str]]` Query parameters - `url: Optional[str]` Request URL ### Stack Frame - `class StackFrame: …` Stack trace frame information (Sentry-compatible) - `colno: Optional[int]` Column number in the line - `context_line: Optional[str]` - `filename: Optional[str]` File name or path - `function: Optional[str]` Function name - `in_app: Optional[bool]` Whether this frame is in application code (vs library/framework code) - `lineno: Optional[int]` Line number in the file - `module: Optional[str]` Module or package name - `post_context: Optional[List[str]]` - `pre_context: Optional[List[str]]` Source code context around the error line - `vars: Optional[Dict[str, str]]` Additional frame-specific variables/locals