The value was in nine places and one enum, and the enum was the only one that ran
You add a value to a feature. It goes into the type union, into the metadata map the create form renders from, into the access table, into the shelf that decides what appears on the landing pages, into the sitemap. You write sample content for it. You run the suite. Green. Then someone opens the site, picks the new option, and the request comes back 400 Invalid input — every time, for everybody,…
The birthday theme caused issues for the picture-book generator service. It was added to nine places in the system, but only one enum gate prevented it from functioning properly. The enum gate had never encountered the seventh theme, so when the seventh theme was selected by a user, the request returned a 400 error. The issue stemmed from a hand-written schema in a route that was not updated when the new theme was added.
The unit suite and production testing did not detect the problem because they did not exercise the edge case. The validation test passed because the reality had not caught up with the new theme. Fixing the issue required adding the birthday theme to the pipeline, which required three requests to the API gate. The theme was intended to represent something observed rather than counted, and it was meant to enhance the birthday gift experience.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.