confluentinc / confluentinc/confluent-kafka-javascript

Support for Avro Schema Validation and Custom Error Handling

Open
#237 0 comments 2 reactions 0 assignees View on GitHub
component:schema-registry
Dominant language
TypeScript
Stars
304
Forks
45
Avg merge
11h 47m
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.