History

Merge remote-tracking branch 'origin/codex/effect-lint-blob-store-errors' into codex/effect-lint-integration

Rhys Sullivan committed 6 months ago

Commit 1a269ea2 parents 28901d9 a02b3cc2 files · +6 −10Browse files

Unified · Split

2 files
  1. packages/core/storage-file/src/blob-store.ts +3 −5
  2. packages/core/storage-postgres/src/blob-store.ts +3 −5
packages/core/storage-file/src/blob-store.ts+3−5
@@ -35,13 +35,11 @@ export interface MakeSqliteBlobStoreOptions { · 34 unmodified lines
35 35
36const wrapErr =36const wrapErr =
37 (op: string) =>37 (op: string) =>
38 (cause: unknown): StorageError => {38 (cause: unknown): StorageError =>
39 const msg = cause instanceof Error ? cause.message : String(cause);39 new StorageError({
40 return new StorageError({40 message: `[storage-file] blob ${op} failed`,
41 message: `[storage-file] blob ${op}: ${msg}`,
42 cause,41 cause,
43 });42 });
44 };
45 43
46export const makeSqliteBlobStore = (44export const makeSqliteBlobStore = (
47 options: MakeSqliteBlobStoreOptions,45 options: MakeSqliteBlobStoreOptions,
packages/core/storage-postgres/src/blob-store.ts+3−5
@@ -36,13 +36,11 @@ export interface MakePostgresBlobStoreOptions { · 35 unmodified lines
36 36
37const wrapErr =37const wrapErr =
38 (op: string) =>38 (op: string) =>
39 (cause: unknown): StorageError => {39 (cause: unknown): StorageError =>
40 const msg = cause instanceof Error ? cause.message : String(cause);40 new StorageError({
41 return new StorageError({41 message: `[storage-postgres] blob ${op} failed`,
42 message: `[storage-postgres] blob ${op}: ${msg}`,
43 cause,42 cause,
44 });43 });
45 };
46 44
47export const makePostgresBlobStore = (45export const makePostgresBlobStore = (
48 options: MakePostgresBlobStoreOptions,46 options: MakePostgresBlobStoreOptions,