fix(snjs): bring back history tests and fix handlinf of error with revisions
This commit is contained in:
@@ -29,8 +29,14 @@ export class GetRevision implements UseCaseInterface<HistoryEntry> {
|
||||
}
|
||||
const revisionUuid = revisionUuidOrError.getValue()
|
||||
|
||||
const revision = await this.revisionManager.getRevision(itemUuid, revisionUuid)
|
||||
if (revision === null) {
|
||||
let revision
|
||||
try {
|
||||
revision = await this.revisionManager.getRevision(itemUuid, revisionUuid)
|
||||
} catch (error) {
|
||||
return Result.fail(`Could not get revision: ${(error as Error).message}`)
|
||||
}
|
||||
|
||||
if (!revision) {
|
||||
return Result.fail('Could not get revision: Revision not found')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user