fix: preserve provider error status (#39976)
This commit is contained in:
parent
d5f6c088f0
commit
003b22edda
9 changed files with 81 additions and 33 deletions
|
|
@ -1,9 +1,11 @@
|
|||
export * as SessionError from "./session-error.js"
|
||||
|
||||
import { Schema } from "effect"
|
||||
import { optional } from "./schema.js"
|
||||
|
||||
export interface Error extends Schema.Schema.Type<typeof Error> {}
|
||||
export const Error = Schema.Struct({
|
||||
type: Schema.String,
|
||||
message: Schema.String,
|
||||
status: Schema.Int.check(Schema.isBetween({ minimum: 100, maximum: 599 })).pipe(optional),
|
||||
}).annotate({ identifier: "Session.StructuredError" })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue