// API errors — Schema-backed so they cross the wire typed; status set per-endpoint via // HttpApiSchema.status in api.ts. import { Schema } from "effect"; /** PUT /api/config body failed schema validation. → 400 */ export class ConfigInvalid extends Schema.TaggedErrorClass()( "ConfigInvalid", { issues: Schema.String }, ) {} /** A sync pass is already running (the trigger was coalesced). → 409 */ export class SyncInProgress extends Schema.TaggedErrorClass()( "SyncInProgress", {}, ) {} /** * No exporter output was found, or the file is unreadable / not a valid export / stamped * with a schema this plugin does not understand. → 503, because it is a "the other half * isn't installed yet" state rather than a server fault: the UI turns it into onboarding. */ export class ExportUnavailable extends Schema.TaggedErrorClass()( "ExportUnavailable", { message: Schema.String }, ) {}