Display information for a problem type.

Providers define multiple problem types (e.g., an Email Integration provider might have 'delivery-failed', 'validation-error', 'attachment-too-large'). ProblemType provides the human-readable display information for each type.

The platform retrieves this information via getType and getTypes to display problems with appropriate titles and icons.

Example

Implementing type methods in a provider

class EmailProblemProvider implements ProblemProvider {
private types: ProblemType[] = [
{
id: 'delivery-failed',
title: 'Delivery Failed',
description: 'Email could not be delivered to the recipient',
icon: 'envelope-exclamation'
},
{
id: 'validation-error',
title: 'Validation Error'
}
];

getTypes(): ProblemType[] {
return this.types;
}

getType(type: string): ProblemType | undefined {
return this.types.find(t => t.id === type);
}
}

See

Hierarchy

  • ProblemType

Properties

Properties

description?: string

Detailed description of what this type of problem means.

Provides context to help users understand the nature of the problem. May be displayed in tooltips or detail views.

icon?: string | Icon

Icon to display for problems of this type.

Can be either a string referencing an icon name from the platform's icon library, or an Icon object with additional properties like color.

See

Icon

id: string

The type identifier as used in type.

title: string

Human-readable title for the problem type.

Displayed as the primary label for problems of this type. Should be concise but descriptive (e.g., 'Delivery Failed', 'Connection Error').