Skip to content
Ona Docs

ReportErrors

client.errors.reportErrors(ErrorReportErrorsParams { events } body, 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.
ParametersExpand Collapse
body: ErrorReportErrorsParams { events }
events?: Array<ErrorEvent { breadcrumbs, environment, eventId, 15 more } >

Error events to be reported (batch) - now using Sentry-compatible structure

One of the following:
environment?: string

Environment (e.g., “production”, “staging”, “development”)

maxLength100
eventId?: string

Unique event identifier (required by Sentry)

maxLength32
minLength32
exceptions?: Array<ExceptionInfo { mechanism, module, stacktrace, 3 more } >

Exception information (primary error data)

mechanism?: ExceptionMechanism { data, description, handled, 2 more }

Exception mechanism

data?: Record<string, string>

Additional mechanism-specific data

description?: string

Human-readable description of the mechanism

maxLength1000
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”)

maxLength100
minLength1
module?: string

Module or package where the exception type is defined

maxLength200
stacktrace?: Array<StackFrame { colno, contextLine, filename, 7 more } >

Stack trace frames

colno?: number

Column number in the line

formatint32
contextLine?: string
maxLength1000
filename?: string

File name or path

maxLength1000
function?: string

Function name

maxLength1000
inApp?: boolean

Whether this frame is in application code (vs library/framework code)

lineno?: number

Line number in the file

formatint32
module?: string

Module or package name

maxLength1000
postContext?: Array<string>
preContext?: Array<string>

Source code context around the error line

vars?: Record<string, string>

Additional frame-specific variables/locals

threadId?: string

Thread ID if applicable

maxLength100
type?: string

Exception type/class name

maxLength200
minLength1
value?: string

Exception message/value

maxLength10000
extra?: Record<string, string>

Additional arbitrary metadata

fingerprint?: Array<string>

Custom fingerprint for grouping

identityId?: string

Identity ID of the user (UUID)

level?: ErrorLevel

Error severity level

One of the following:
"ERROR_LEVEL_UNSPECIFIED"
"ERROR_LEVEL_DEBUG"
"ERROR_LEVEL_INFO"
"ERROR_LEVEL_WARNING"
"ERROR_LEVEL_ERROR"
"ERROR_LEVEL_FATAL"
logger?: string

Logger name

maxLength200
modules?: Record<string, string>

Modules/dependencies information

platform?: string

Platform identifier (required by Sentry)

maxLength100
minLength1
release?: string

Release version

maxLength200
request?: RequestInfo { data, headers, method, 2 more }

Request information

data?: string

Request body (truncated if large)

maxLength10000
headers?: Record<string, string>

Request headers

method?: string

HTTP method

maxLength10
queryString?: Record<string, string>

Query parameters

url?: string

Request URL

maxLength2000
sdk?: Record<string, string>

SDK information

serverName?: string

Server/host name

maxLength200
tags?: Record<string, string>

Tags for filtering and grouping

timestamp?: string

When the event occurred (required by Sentry)

formatdate-time
transaction?: string

Transaction name (e.g., route name, function name)

maxLength200
ReturnsExpand Collapse
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

ReportErrors

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);
{}
Returns Examples
{}