riferrei / srclient

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

change error from fmt.Errorf("%s: %s", resp.Status, errorResp.Message… #59

Closed biryukovmaxim closed 2 years ago

biryukovmaxim commented 2 years ago

change error from fmt.Errorf("%s: %s", resp.Status, errorResp.Message) to Error struct it need in case like that: schema, err := c.schemaRegistryClient.GetLatestSchema(topicName) var srcErr srclient.Error if err != nil && errors.As(err, &srcErr) && srcErr.Code != 40401 { return err } else { createSchema() }

sort imports

AtakanColak commented 2 years ago

Thanks for the PR, looks good to me, but would appreciate thoughts from others.