riferrei / srclient

Golang Client for Schema Registry
Apache License 2.0
236 stars 70 forks source link

MockSchemaRegistryClient.GetLatestSchema() panics when called with an an inexistent subject #64

Closed topliceanu closed 2 years ago

topliceanu commented 2 years ago

This is where the panic happens: https://github.com/riferrei/srclient/blob/v0.4.0/mockSchemaRegistryClient.go#L110

How to reproduce?

client := srclient.CreateMockSchemaRegistryClient(<some-mock-url>)
schema, err := client.GetLatestSchema("<some-inexistent-schema-subject>")
AtakanColak commented 2 years ago

Good catch, any PRs welcome.

topliceanu commented 2 years ago

Done @AtakanColak. See https://github.com/riferrei/srclient/pull/67