Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion backend/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def send_bloom():
if type_check_error is not None:
return type_check_error

user = get_current_user()
if len(request.json["content"]) > 280:
return make_response((f"Bloom too long", 422))

user = get_current_user()

blooms.add_bloom(sender=user, content=request.json["content"])

Expand Down
1 change: 1 addition & 0 deletions front-end/components/error.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const _STATUS_MESSAGES = {
404: "Not Found - The requested resource does not exist.",
405: "Not Allowed - The server knows the request method, but the target resource doesn't support this method.",
418: "I'm a teapot - Server refuses to brew coffee with a teapot.",
422: "Invalid data - The request was well-formed but was unable to be followed due to semantic errors.",
500: "Internal Server Error - Something went wrong on the server.",
};

Expand Down