kork
kork copied to clipboard
fix(retrofit): Add exception handler to service factory
This commit adds the SpinnakerRetroExceptionHandler when creating service clients which allows us to return a proper exception back instead of relying on RetrofitError.
This commit also moves the UpstreamBadRequest to the more appropriate package of kork-retrofit. This allows for other classes within kork-retrofit to use it without creating a circular dependency. In addition this also makes the UpstreamBadRequest class serializable by not passing the RetrofitError into the super call.