Skip to content

Commit

Permalink
fix: throw read error on read error (#304)
Browse files Browse the repository at this point in the history
Fixes #299
  • Loading branch information
achingbrain committed Apr 9, 2024
1 parent 2e8f8db commit f14c824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/datastore-idb/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class IDBDatastore extends BaseDatastore {
try {
await this.db.delete(this.location, key.toString())
} catch (err: any) {
throw Errors.dbWriteFailedError(err)
throw Errors.dbDeleteFailedError(err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/datastore-level/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class LevelDatastore extends BaseDatastore {
throw Errors.notFoundError(err)
}

throw Errors.dbWriteFailedError(err)
throw Errors.dbReadFailedError(err)
}
return data
}
Expand Down

0 comments on commit f14c824

Please sign in to comment.