-
Notifications
You must be signed in to change notification settings - Fork 6
Add test coverage for the 100KiB body limit and 413 error mapping #17
Copy link
Copy link
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issuearea:error-handlingerror handlingerror handlingpriority:mediumMedium priorityMedium prioritystack:expressstack:expressstack:expressstack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:testTest coverage workTest coverage work
Metadata
Metadata
Assignees
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issuearea:error-handlingerror handlingerror handlingpriority:mediumMedium priorityMedium prioritystack:expressstack:expressstack:expressstack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:testTest coverage workTest coverage work
Type
Fields
Give feedbackNo fields configured for Feature.
Test the payload-too-large 413 mapping in the error handler
Description
src/index.tsconfiguresexpress.json({ limit: "100kb" })and the final error handler maps the resultingentity.too.largeerror to a413 payload_too_largebody — but no test exercises this path. The generic500 internal_errorbranch is likewise uncovered. This issue adds tests for both.Requirements and context
StableRoute-Org/Stableroute-backendonly.413witherror: "payload_too_large"andrequestId.500 internal_errorshape includingmethodandpath.Suggested execution
git checkout -b test/error-handling-17-413-500src/__tests__/errorHandler.test.ts."x".repeat(...)).Test and commit
npm run build,npm run lint, andnpm test.npm testoutput and a coverage summary in the PR.Example commit message
test(error-handling): cover 413 payload-too-large and 500 branchesGuidelines
Community & contribution rewards