fix(server): remove storage not found defect fallback (#27287)

This commit is contained in:
Shoubhit Dash 2026-05-13 14:15:53 +05:30 • committed by GitHub
commit 4b041716fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,5 @@
import { Provider } from "@/provider/provider"
import { Session } from "@/session/session"
import { NotFoundError } from "@/storage/storage"
import { iife } from "@/util/iife"
import { NamedError } from "@opencode-ai/core/util/error"
import * as Log from "@opencode-ai/core/util/log"
@ -24,10 +23,6 @@ export const errorLayer = HttpRouter.middleware<{ handles: unknown }>()((effect)
const error = defect.defect
log.error("failed", { error, cause: Cause.pretty(cause) })
if (error instanceof NotFoundError) {
return Effect.succeed(HttpServerResponse.jsonUnsafe(error.toObject(), { status: 404 }))
}
if (error instanceof NamedError) {
return Effect.succeed(
HttpServerResponse.jsonUnsafe(error.toObject(), {