mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-24 18:06:14 -10:00
13 lines
492 B
TypeScript
13 lines
492 B
TypeScript
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),
|
|
response: Schema.Struct({ body: Schema.String }).pipe(optional),
|
|
}).annotate({ identifier: "Session.StructuredError" })
|