From 58a3d0c5019b3fcb4037b498f14dd60f621e7a25 Mon Sep 17 00:00:00 2001 From: Gerard Clos Date: Wed, 18 Sep 2024 12:08:28 +0200 Subject: [PATCH] chore: added more data in not found error --- packages/core/src/repositories/commitsRepository/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/repositories/commitsRepository/index.ts b/packages/core/src/repositories/commitsRepository/index.ts index 50faffb08..c4b8e5e42 100644 --- a/packages/core/src/repositories/commitsRepository/index.ts +++ b/packages/core/src/repositories/commitsRepository/index.ts @@ -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) }