Update src/routes/api/tenants/[id]/agents/[agentId]/absences/[absenceId]/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Hendrik
2025-09-16 16:10:46 +02:00
committed by GitHub
co-authored by Copilot
parent e2467c97d3
commit 782bb788d0
@@ -340,7 +340,7 @@ export const GET: RequestHandler = async ({ params, locals }) => {
// Check if user is authenticated
if (!tenantId || !agentId || !absenceId) {
return new ValidationError("Missing tenant, agent, or absence ID").toJson();
throw new ValidationError("Missing tenant, agent, or absence ID");
}
checkPermission(locals, tenantId);