Technical error details for a problem.

While description provides a user-friendly explanation, ProblemError captures the underlying technical details useful for debugging. This separation allows the platform to show appropriate information to different audiences.

Example

Problem with error details

const problem: Problem = {
id: 'sync-001',
providerId: 'external-crm',
type: 'connection-error',
description: 'Could not sync deal with external CRM',
createdAt: new Date().toISOString(),
error: {
message: 'Connection refused by remote host',
code: 'ECONNREFUSED',
stack: 'Error: Connection refused\n at TCPConnectWrap...'
}
};

See

error

Hierarchy

  • ProblemError

Properties

Properties

code?: string

Error code for programmatic handling.

Codes allow categorizing errors without parsing message text. Use standard codes where applicable (e.g., ETIMEDOUT, ECONNREFUSED) or provider-specific codes.

message: string

Technical error message.

This is the raw error message from the underlying system, which may be more technical than the user-facing description.

stack?: string

Stack trace for debugging.

The full stack trace helps developers diagnose where errors originated. May be displayed in an expandable "Technical Details" section.