Skip to content

Add error responses for quest and reward endpoints#75

Open
mintlify[bot] wants to merge 1 commit intomainfrom
mintlify/quest-reward-errors-1774094094
Open

Add error responses for quest and reward endpoints#75
mintlify[bot] wants to merge 1 commit intomainfrom
mintlify/quest-reward-errors-1774094094

Conversation

@mintlify
Copy link

@mintlify mintlify bot commented Mar 21, 2026

Summary

Syncs API docs with d-sports-ecosystem/d-sports-api@4e3010b which aligned route errors with action status codes in quest and reward routes.

Trigger repo changes

  • app/api/quests/start/route.ts, app/api/quests/complete-step/route.ts, app/api/quests/check-progress/route.ts, app/api/quests/daily-visit/route.ts — now catch ActionError and preserve its HTTP status and code instead of returning generic 500s.
  • app/api/rewards/claim/route.ts, app/api/rewards/redeem/route.ts — same ActionError handling, plus redeem returns 404/409 for domain-specific failures.

Docs changes

  • api-reference/openapi.json — Added 400, 401, 404, 409, 500 error responses to all quest and reward endpoints to match the actual route behavior.
  • api-reference/errors-and-status-codes.mdx — Documented the error envelope format ({ success, error, code }), added a table of domain-specific error codes for quest/reward routes, and updated guidance to match on the code field.

@mintlify
Copy link
Author

mintlify bot commented Mar 21, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
d-sports 🟢 Ready View Preview Mar 21, 2026, 11:55 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants