-
Couldn't load subscription status.
- Fork 6k
Description
Description
If a network error occurs, e.g. connection refused, then the resty client will use its default logger (which logs to os.Stderr) to log an error message. This is not correct behavior, as the app invoking the generated code should be the entity to decide how to log messages.
Swagger-codegen version
master
Steps to reproduce
Invoke the generated Go client, targeting an endpoint that doesn't exist. Resty will log an error to Stderr.
Suggest a Fix
Immediately: Add a line to api_client.go/ prepareClient to disable the resty logger (rClient.SetLogger(ioutil.Discard)).
Full solution: Either add LogDest io.Writerto the Configuration object, or possibly look at making the resty client instance available somehow, for anybody who might need this level of control.