(error: ErrorConstraint | undefined)
| 406 | } |
| 407 | |
| 408 | function getError(error: ErrorConstraint | undefined): ReadonlySet<Schema.Top> { |
| 409 | if (error === undefined) return new Set() |
| 410 | return new Set(Array.isArray(error) ? error : [error]) |
| 411 | } |
| 412 | |
| 413 | /** |
| 414 | * Creates a middleware layer that transforms `HttpApiSchemaError` failures. |