You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the schema from a Confluent Schema Registry is assumed to be AVRO which is the default. If it is not, we still attempt to parse it and then can get somewhat confusing errors like MultiJson::ParseError for PROTOBUF schema.
It would be nice to throw a more specific error here like
classAvroTurfclassMessagingclassIncompatibleSchemaError < StandardError;enddeffetch_schema(subject:,version: 'latest')schema_data=registry.subject_version(subject,version)schema_id=schema_data.fetch('id')schema_type=schema_data["schemaType"]ifschema_type.present? && schema_type != "AVRO"raiseIncompatibleSchemaError("The #{schema_type} schema for #{subject} is incompatible.")endschema=Avro::Schema.parse(schema_data.fetch('schema'))[schema,schema_id]endendend
For the long-run, it would be awesome to get maybe a new gem that could handle all three schema types that the registry supports: AVRO, PROTOBUF, and JSON. I know it has been brought up before in #158 to reuse some of this gem.
The text was updated successfully, but these errors were encountered:
Right now, the schema from a Confluent Schema Registry is assumed to be AVRO which is the default. If it is not, we still attempt to parse it and then can get somewhat confusing errors like
MultiJson::ParseError
forPROTOBUF
schema.It would be nice to throw a more specific error here like
For the long-run, it would be awesome to get maybe a new gem that could handle all three schema types that the registry supports: AVRO, PROTOBUF, and JSON. I know it has been brought up before in #158 to reuse some of this gem.
The text was updated successfully, but these errors were encountered: