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