Skip to content

NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 1 | Extralong bloom bug - #239

Open
ZabihollahNamazi wants to merge 2 commits into
CodeYourFuture:mainfrom
ZabihollahNamazi:extralong-bloom-bug
Open

NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 1 | Extralong bloom bug#239
ZabihollahNamazi wants to merge 2 commits into
CodeYourFuture:mainfrom
ZabihollahNamazi:extralong-bloom-bug

Conversation

@ZabihollahNamazi

@ZabihollahNamazi ZabihollahNamazi commented Jul 2, 2026

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

This PR replaces Old PR , which was closed due to a git branching issue. The previous branch accidentally included commits and tasks from an unrelated feature branch.
This new branch has been cleanly separated so it contains only the commits specific to this task.
I would really appreciate it if you could take a quick look and review this new PR . Thank you!

@ZabihollahNamazi ZabihollahNamazi changed the title Extralong bloom bug NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 1 | Extralong bloom bug Jul 2, 2026
@ZabihollahNamazi ZabihollahNamazi added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Legacy-Code The name of the module. labels Jul 2, 2026
Comment thread backend/endpoints.py
Comment on lines +159 to +160
if len(request.json["content"]) > 280:
return make_response((f"Bloom too long", 422))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the bug. well done.

Why not replace the magic number 280 by a named constant?

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: "Something is wrong with the information you filled out. Please check your inputs and try again.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the status message associated with 422 a standard status message? How did you come up with this message?

Comment thread .gitignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the change made in this file necessary to fix the bug?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Legacy-Code The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants