feat: more contextual not found errors

This commit is contained in:
Daniel Hougaard
2024-10-19 05:00:14 +04:00
parent 38d8b14b03
commit c6f66226c8
75 changed files with 925 additions and 538 deletions
+3 -3
View File
@@ -186,7 +186,7 @@ export const projectDALFactory = (db: TDbClient) => {
})?.[0];
if (!project) {
throw new NotFoundError({ message: "Project not found" });
throw new NotFoundError({ message: `Project with ID '${id}' not found` });
}
return project;
@@ -235,7 +235,7 @@ export const projectDALFactory = (db: TDbClient) => {
})?.[0];
if (!project) {
throw new NotFoundError({ message: "Project not found" });
throw new NotFoundError({ message: `Project with slug '${slug}' not found` });
}
return project;
@@ -295,7 +295,7 @@ export const projectDALFactory = (db: TDbClient) => {
.first();
if (!project) {
throw new NotFoundError({ message: "Project not found" });
throw new NotFoundError({ message: `Project with ID '${projectId}' not found` });
}
return {