Skip to content

Commit d81e039

Browse files
DOMjudge teammeisterT
authored andcommitted
Add judgehost hostname to error message and sync with other code
1 parent 9f44e13 commit d81e039

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webapp/src/Controller/API/JudgehostController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ public function updateJudgingAction(
288288
): void {
289289
$judgehost = $this->em->getRepository(Judgehost::class)->findOneBy(['hostname' => $hostname]);
290290
if (!$judgehost) {
291-
throw new BadRequestHttpException("Who are you and why are you sending us any data?");
291+
throw new BadRequestHttpException(
292+
'Register yourself first. You (' . $hostname . ') are not known to us yet.'
293+
);
292294
}
293295

294296
$judgingRun = $this->em->getRepository(JudgingRun::class)->findOneBy(['judgetaskid' => $judgetaskid]);

0 commit comments

Comments
 (0)