London | 26-SDC-March | Zobeir Rigi | Legacy-Code |Sprint 1 | Bug-Report-Extra-long-blooms - #250
Open
Zobeir-Rigi wants to merge 1 commit into
Open
Conversation
cjyuan
reviewed
Jul 23, 2026
cjyuan
left a comment
There was a problem hiding this comment.
You identified the place to change in order to fix the bug, but the change could still be improved.
Comment on lines
+161
to
+167
| if len(request.json["content"]) > 280: | ||
| return jsonify( | ||
| { | ||
| "success": False, | ||
| "message": "Bloom must not exceed 280 characters", | ||
| } | ||
| ), 400 |
There was a problem hiding this comment.
-
Why not replace the magic number
280by a named constant? -
Can the code run? The syntax does not look right.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Blooms longer than 280 characters could be posted even though blooms are intended to be limited to 280 characters.
Fix
Added backend validation to reject blooms that exceed the 280-character limit before they are saved.