[enhancement] createSSRequest: fail-fast when storeNumber is missing #5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every subType in
REQUEST_TYPE_MAP(perss-fields-*.json) requiresStore Number. CurrentlycreateSSRequestproceeds whenstoreNumberis missing, and Jira rejects with a generic required-field error that mentions Jira internals instead of our API contract.Fix: add a client-side guard at the top of
createSSRequestthat returns a clear 400 (storeNumber is required for subType "...") before making the API call.Optional: if a subType is ever added that does not require Store Number, key the guard off a per-subType flag in
REQUEST_TYPE_MAP.Fixed in commit
312448f.SUBTYPES_REQUIRING_STORE_NUMBERset inservices/jira/jsmRequests.js, seeded with every current subType (all 14 mark Store Numberrequired: truein the discoveredss-fields-*.json).createSSRequestnow trimsstoreNumber(rejects whitespace-only) and throws a400with"storeNumber is required for subType X"before making any Jira API call.err.status = 400so non-route callers can distinguish client errors from Jira failures.Commits on
cursor/hardening-4-5-6-7:c4a0a69Fix #4312448fFix #5b8f2eabRefactor #6Branch: cursor/hardening-4-5-6-7
Compare: init-repo-and-jira-lifecycle...hardening-4-5-6-7