diff --git a/backend/src/kyc-upsert-service.ts b/backend/src/kyc-upsert-service.ts index aeabd083..a191dc83 100644 --- a/backend/src/kyc-upsert-service.ts +++ b/backend/src/kyc-upsert-service.ts @@ -8,6 +8,8 @@ export class ValidationError extends Error { constructor(message: string) { super(message); this.name = 'ValidationError'; + // Restore prototype chain so `instanceof ValidationError` works after transpilation + Object.setPrototypeOf(this, new.target.prototype); } }