Skip to content

feat: Investment API error handling, logging & metrics; harden Listing API against injection - #1469

Merged
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
oladev2026-tech:fix/investment-listing-api-1393-1397-1398-1399
Oct 18, 2026
Merged

nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
oladev2026-tech:fix/investment-listing-api-1393-1397-1398-1399

Conversation

@oladev2026-tech

Copy link
Copy Markdown
Contributor

Summary

Listing API – injection hardening (#1393)

  • sortBy on GET /properties/search was a free string passed straight into Prisma orderBy; it is now restricted to PROPERTY_SORT_FIELDS.
  • Free-text filters (city, state, zipCode, country, location, propertyType, category, tag, amenityType) are capped at 100 characters.

Investment API

Docs: docs/api/investment-api.md, docs/api/listing-api-hardening.md.

Closes #1393
Closes #1397
Closes #1398
Closes #1399

🤖 Generated with Claude Code

… search

- Add investment error helpers, structured logger and Prometheus metrics
- Restrict sortBy to PROPERTY_SORT_FIELDS and cap free-text filters at 100 chars

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@oladev2026-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit
nanaf6203-bit merged commit 0418b6d into MettaChain:main Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants