Skip to content

fix(backend): restore ValidationError prototype chain for instanceof (#656)#732

Merged
Haroldwonder merged 1 commit into
Haroldwonder:mainfrom
AnnabelJoe:fix/656-validation-error-export
Jun 1, 2026
Merged

fix(backend): restore ValidationError prototype chain for instanceof (#656)#732
Haroldwonder merged 1 commit into
Haroldwonder:mainfrom
AnnabelJoe:fix/656-validation-error-export

Conversation

@AnnabelJoe
Copy link
Copy Markdown

Closes #656

Problem

ValidationError was exported but instanceof ValidationError checks failed after TypeScript transpilation because the prototype chain was not restored.

Fix

Added Object.setPrototypeOf(this, new.target.prototype) in the constructor so callers can reliably use instanceof ValidationError for typed error handling.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@AnnabelJoe is attempting to deploy a commit to the Harold's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@AnnabelJoe 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

@Haroldwonder Haroldwonder merged commit 575cba0 into Haroldwonder:main Jun 1, 2026
1 check failed
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.

kyc-upsert-service.ts ValidationError not exported, preventing typed error handling

2 participants