(error: ErrorConstraint | undefined)
| 379 | } |
| 380 | |
| 381 | function getError(error: ErrorConstraint | undefined): ReadonlySet<Schema.Top> { |
| 382 | if (error === undefined) return new Set() |
| 383 | return new Set(Array.isArray(error) ? error : [error]) |
| 384 | } |
| 385 | |
| 386 | /** |
| 387 | * Creates a middleware layer that transforms `HttpApiSchemaError` failures. |