Skip to content

WestMidlands | SDC Nov 2025| Sara Tahir | Sprint 1| ExtraLong Bloom#110

Open
SaraTahir28 wants to merge 1 commit intoCodeYourFuture:mainfrom
SaraTahir28:feature/bloomlength
Open

WestMidlands | SDC Nov 2025| Sara Tahir | Sprint 1| ExtraLong Bloom#110
SaraTahir28 wants to merge 1 commit intoCodeYourFuture:mainfrom
SaraTahir28:feature/bloomlength

Conversation

@SaraTahir28
Copy link

Learners, PR Template

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

  1. Added server‑side length check to ensure bloom content does not exceed 280 characters.
  2. Returns a 400 error with a clear message when the limit is exceeded.
  3. Aligns backend behaviour with existing frontend maxlength restriction.
  4. Manually verified by removing the maxlength attribute in DevTools and confirming the backend now rejects oversized blooms.

Questions

I initially planned to use the more robust request.get_json().get("content") pattern, but since this backend consistently accesses JSON via request.json["..."], I kept the implementation aligned with the current style. I want to know whats the best approach while working with legacy code, do we always keep our implementationa aligned with the current style ?

@SaraTahir28 SaraTahir28 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant