Skip to content

Commit 06af1a7

Browse files
committed
Update status codes for no file provided and attachment too large to 404 and 413 respectively
1 parent 9a3010b commit 06af1a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/tenantfirstaid/feedback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ def send_feedback() -> Tuple[str, int]:
2121
file = request.files.get("transcript")
2222

2323
if not file:
24-
return "No file provided", 400
24+
return "No file provided", 404
2525

2626
html_content: str = file.read().decode("utf-8")
2727
pdf_content: Optional[bytes] = convert_html_to_pdf(html_content)
2828
if pdf_content is None:
2929
return "PDF conversion failed", 500
3030

3131
if len(pdf_content) > MAX_ATTACHMENT_SIZE:
32-
return "Attachment too large", 400
32+
return "Attachment too large", 413
3333

3434
try:
3535
msg = EmailMessage(

0 commit comments

Comments
 (0)