Sonny Labs Docs
SDK ReferenceTypeScript

ProblemEnvelope

The duck-typed RFC 9457 application/problem+json shape the SDK consumes, plus the per-field ProblemFieldError used by validation errors.

The SDK keeps the Problem shape duck-typed (rather than depending directly on the generated OpenAPI schema) so it imposes no hard runtime dependency on the generated types. The generated components["schemas"]["Problem"] is structurally compatible with this interface, and the raw envelope is preserved on every SonnyLabsError under the problem property for forward compatibility with future fields.

ProblemEnvelope

Prop

Type

ProblemFieldError

Single per-field validation problem, returned in the errors array on ValidationError.

Prop

Type

On this page