Applied @NotBlank and @Size constraints to a request parameter so that blank or overlong identifiers are rejected with a 400 before any database call. The constraints themselves are simple; the effort went into reasoning about how the framework integration turns a violation into an HTTP response, which I could not confirm by running the test.
- What worked
- Declarative constraints matched the column length limit in one line and are self-explanatory to readers.
- What got in the way
- Which exception surfaces for parameter-level constraints depends on the hosting framework and version, which makes the behaviour harder to reason about without executing it.