-
Notifications
You must be signed in to change notification settings - Fork 102
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
Errors are very minimalistic and hard to debug with #123
Comments
I would like to add to this, currently getting |
Going to add my current workaround, logging the
|
FWIW - i found myself re-validating via Ajv if the registry returns an error (which should be unnecessary!) related: #236 example // encode
return registry.encode(valueSchemaID, row)
.catch( (error) => {
// validate
// https://ajv.js.org/guide/getting-started.html
// NOTE:
// It might seem strange that we validate here, since
// the schema registry should have already done this ... but the schema registry
// doesn't return the actual error, just a generic message.
//
// Additionally: there's a bug where you can't specify the AJV instance for the registry
// to use, so we can't harvest the error from their either.
// Bug: https://github.com/kafkajs/confluent-schema-registry/issues/236
const valid = this.avj.validate(this.options.schema, row)
if ( !valid ) {
StandardLogger.warn('validation errors', { context, key, errors: this.avj.errors })
}
}) |
Many errors logged/thrown have very minimalistic messages which often hide the problem.
I have found myself having to debug by adding logs into the schema registry code which is not ideal.
Ideally, the logs would provide full traces where possible and contextual information which is unambiguous.
The text was updated successfully, but these errors were encountered: