Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Avro Schema Validation and Custom Error Handling #237

Open
paister opened this issue Jan 13, 2025 · 0 comments
Open

Support for Avro Schema Validation and Custom Error Handling #237

paister opened this issue Jan 13, 2025 · 0 comments

Comments

@paister
Copy link

paister commented Jan 13, 2025

Hello,

We are using kafkaJS to validate events against Avro schemas with custom error handling using the following code:

const latestSchemaId = await registry.getLatestSchemaId(schemaRegistrySubject);
const schema = await registry.getSchema(latestSchemaId);
schema.isValid(event, {
  errorHook: (path, value, type) => {
    console.log(path, value, type);
  },
});

I'd like to switch to your library, but it currently doesn't support:

  1. Validating events against Avro schemas.
  2. Providing a custom error handler (like an errorHook) to access detailed validation error information.
    Feature Request:

Please consider adding support for (Avro) schema validation in your registry lib and a way to handle validation errors with detailed context (path, value, type). This would greatly help in managing and logging validation errors effectively.

Thank you for your consideration.

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

No branches or pull requests

2 participants