Skip to content

Commit e80d605

Browse files
committed
CWS API: Reply to well-formed, but rejected submissions with HTTP status 422
Closes #1450.
1 parent 306d99e commit e80d605

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • cms/server/contest/handlers

cms/server/contest/handlers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def post(self, task_name: str):
162162
except UnacceptableSubmission as e:
163163
logger.info("API submission rejected: `%s' - `%s'",
164164
e.subject, e.formatted_text)
165-
self.json({"error": e.subject, "details": e.formatted_text}, 400)
165+
self.json({"error": e.subject, "details": e.formatted_text}, 422)
166166
else:
167167
logger.info(
168168
f'API submission accepted: Submission ID {submission.id}')

0 commit comments

Comments
 (0)