Skip to content

Fixed the backend’s dramatic flair: now invalid payloads get a proper… - #207

Open
datagerl wants to merge 1 commit into
Zyntarivoid:mainfrom
datagerl:feature/backend-validation-envelope
Open

Fixed the backend’s dramatic flair: now invalid payloads get a proper…#207
datagerl wants to merge 1 commit into
Zyntarivoid:mainfrom
datagerl:feature/backend-validation-envelope

Conversation

@datagerl

Copy link
Copy Markdown
Contributor

This change enables shared request validation for backend routes and standardizes the response shape for successful and failed requests.
Valid payloads now return a consistent success envelope with data and metadata.
Invalid payloads now return a predictable error envelope with clear details and error codes.
This improves API consistency and makes client-side handling more reliable.

closes #197

… meltdown and valid ones get a classy response envelope.”

@Cedarich Cedarich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @datagerl, thanks for working on this! I appreciate the effort to standardize request validation and response shapes. However, I noticed a significant architectural conflict:

The Issue:
Your PR adds a new standalone Node.js backend (package.json, server.js, src/app.js, src/validation.js) using the native http module. However, the repository already has an active NestJS TypeScript backend in /veilend-backend that serves as the primary API.

This creates:

  • ❌ A duplicate backend that won't be maintained
  • ❌ Conflicting response envelopes across the codebase
  • ❌ Confusion about which backend to extend or deploy

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.

26. Standardize backend responses with a global validation pipe and API envelope

2 participants