Handle unsupported methods on metadata endpoints#235
Conversation
WalkthroughThis PR adds explicit HTTP method validation to three metadata API endpoints by registering fallback handlers for POST, PUT, PATCH, and DELETE requests. A new ChangesMetadata HTTP method handlers
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds explicit non-GET handlers for the metadata endpoints.
Unsupported methods now return the existing unsupported-method response instead of falling through into request body parsing.
Checked with:
./node_modules/.bin/eslint src/routes/metadata-routes.tsI also tried
npm run check:types, but this checkout currently fails in an existing test import:src/paymaster/index.test.tsexpectsPAYMASTER_ADDRESSfrom../constants/Token.js.