Skip to content

Commit

Permalink
chore: added more data in not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
geclos committed Sep 18, 2024
1 parent 867f3a0 commit 58a3d0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/repositories/commitsRepository/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ export class CommitsRepository extends Repository<
.where(eq(this.scope.uuid, uuid))
.limit(1)
const commit = result[0]
if (!commit) return Result.error(new NotFoundError('Commit not found'))
if (!commit)
return Result.error(
new NotFoundError(`Commit with uuid ${uuid} not found`),
)

return Result.ok(commit)
}
Expand Down

0 comments on commit 58a3d0c

Please sign in to comment.