Skip to content

Issues

Issues defines methods for inspecting the error details of environment parse and check calls.

Non-fatal warnings and notices may be exposed through this class in the future.

new Issues(options?): Issues

Creates an issue set around existing CEL diagnostics.

IssuesOptions = {}

Issues

append(other?): Issues

append combines another issue set into this one without duplicating itself.

Issues

Issues


err(): Error | undefined

err returns an Error when the issue set contains one or more diagnostics.

Error | undefined


errors(): CommonError[]

errors returns the collection of diagnostics in granular form.

CommonError[]


getErrors(): CommonError[]

getErrors exposes the underlying errors for compatibility with lower-level diagnostics.

CommonError[]


merge(other?): void

merge copies another issue set into this accumulator while preserving source locations.

Issues

void


reportErrorAtId(options): void

reportErrorAtId attaches an error to an expression identifier when source metadata is present.

ReportIssueOptions

void


toDisplayString(): string

toDisplayString formats the issue set with source snippets and locations.

string


toString(): string

toString converts the issue set to a display-ready string.

string