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

Expose or log error response from Registry in serdes #5236

Open
jsenko opened this issue Sep 24, 2024 · 1 comment
Open

Expose or log error response from Registry in serdes #5236

jsenko opened this issue Sep 24, 2024 · 1 comment

Comments

@jsenko
Copy link
Member

jsenko commented Sep 24, 2024

Since the serdes communicates with Registry via cache, when Registry returns an error response, it is shadowed by an unhelpful cache error, e.g.:

Failed to update cache value for key: {"type":"record","name":"Key","namespace":"inventory_connector_postgresql1727173403473.inventory.customers","fields":[{"name":"id","type":{"type":"int","connect.default":0},"default":0}],"connect.name":"inventory_connector_postgresql1727173403473.inventory.customers.Key"}   [io.apicurio.registry.resolver.ERCache]
io.apicurio.registry.rest.client.exception.RestClientException
	at io.apicurio.registry.rest.client.impl.ErrorHandler.parseError(ErrorHandler.java:95)
	at io.apicurio.rest.client.JdkHttpClient.sendRequest(JdkHttpClient.java:207)
	at io.apicurio.registry.rest.client.impl.RegistryClientImpl.createArtifact(RegistryClientImpl.java:311)
	at io.apicurio.registry.rest.client.RegistryClient.createArtifact(RegistryClient.java:147)
	at io.apicurio.registry.resolver.DefaultSchemaResolver.lambda$handleAutoCreateArtifact$3(DefaultSchemaResolver.java:278)
	at io.apicurio.registry.resolver.ERCache.lambda$getValue$0(ERCache.java:201)
	at io.apicurio.registry.resolver.ERCache.retry(ERCache.java:254)
	at io.apicurio.registry.resolver.ERCache.getValue(ERCache.java:200)
	at io.apicurio.registry.resolver.ERCache.getByContent(ERCache.java:175)
	at io.apicurio.registry.resolver.DefaultSchemaResolver.handleAutoCreateArtifact(DefaultSchemaResolver.java:276)
	at io.apicurio.registry.resolver.DefaultSchemaResolver.getSchemaFromRegistry(DefaultSchemaResolver.java:123)
	at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchema(DefaultSchemaResolver.java:91)
	at io.apicurio.registry.serde.AbstractKafkaSerializer.serialize(AbstractKafkaSerializer.java:83)
	at io.apicurio.registry.utils.converter.SerdeBasedConverter.fromConnectData(SerdeBasedConverter.java:122)

Improve error handling to expose the underlying error response from Registry.

@apicurio-bot
Copy link

apicurio-bot bot commented Sep 24, 2024

Thank you for reporting an issue!

Pinging @carlesarnal to respond or triage.

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

No branches or pull requests

3 participants