improve logging

This commit is contained in:
tdurieux
2026-05-06 16:31:10 +03:00
parent 873c910dd3
commit 3613c895c8
15 changed files with 77 additions and 20 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ router.get(
if (!(await repo.isReady())) {
throw new AnonymousError("repository_not_ready", {
object: repo,
httpStatus: 503,
httpStatus: 425,
});
}
const f = new AnonymizedFile({
+1 -1
View File
@@ -59,7 +59,7 @@ router.get(
);
}
throw new AnonymousError("gist_not_ready", {
httpStatus: 404,
httpStatus: 425,
object: gist,
});
}
+1 -1
View File
@@ -207,7 +207,7 @@ router.get(
);
}
throw new AnonymousError("repository_not_ready", {
httpStatus: 404,
httpStatus: 425,
object: repo,
});
}
+1 -1
View File
@@ -110,7 +110,7 @@ export function isOwnerCoauthorOrAdmin(repo: Repository, user: User) {
if (repo.owner.id === user.model.id) return;
if (isCoauthor(repo, user)) return;
throw new AnonymousError("not_authorized", {
httpStatus: 401,
httpStatus: 403,
});
}