bencebalogh / avro-schema-registry

Confluent Schema Registry implementation in javascript to easily serialize and deserialize kafka messages
MIT License
28 stars 30 forks source link

Adding a error handler to the .get() request to handle when registry … #16

Closed grgrssll-dev closed 5 years ago

grgrssll-dev commented 5 years ago

…is unavailable

We are having an issue where our whole app crashes if the Schema Registry is unavailable. Easily solved by adding a .on('error') handler to the http(s).get() in fetch-shema.js

I've also added a test.

Thanks.

bencebalogh commented 5 years ago

I've added this commit, the same logic in push-schema function.

It's out in 1.3.2 Thanks for the PR!