fix(storage): type not found errors (#27265)

This commit is contained in:
Shoubhit Dash
2026-05-13 12:25:04 +05:30
committed by GitHub
parent d93a06431e
commit e9a29e4908
6 changed files with 51 additions and 21 deletions
@@ -2,8 +2,6 @@ import type { NotFoundError as StorageNotFoundError } from "@/storage/storage"
import { Effect } from "effect"
import * as ApiError from "../errors"
type StorageNotFound = InstanceType<typeof StorageNotFoundError>
export function mapStorageNotFound<A, R>(self: Effect.Effect<A, StorageNotFound, R>) {
return self.pipe(Effect.mapError((error) => ApiError.notFound(error.data.message)))
export function mapStorageNotFound<A, R>(self: Effect.Effect<A, StorageNotFoundError, R>) {
return self.pipe(Effect.mapError((error) => ApiError.notFound(error.message)))
}