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() }
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