Skip to content

Commit

Permalink
refactor(retrofit): add SpinnakerServerExceptionHandler (#1035)
Browse files Browse the repository at this point in the history
Please refer spinnaker/orca#4524
  • Loading branch information
j-sandy authored May 15, 2024
1 parent bfda4ad commit 41c01eb
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.netflix.kayenta.config.KayentaConfiguration;
import com.netflix.spinnaker.config.OkHttpClientConfiguration;
import com.netflix.spinnaker.orca.retrofit.exceptions.RetrofitExceptionHandler;
import com.netflix.spinnaker.orca.retrofit.exceptions.SpinnakerServerExceptionHandler;
import com.squareup.okhttp.ConnectionPool;
import com.squareup.okhttp.OkHttpClient;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -57,6 +58,12 @@ RetrofitExceptionHandler retrofitExceptionHandler() {
return new RetrofitExceptionHandler();
}

@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
SpinnakerServerExceptionHandler spinnakerServerExceptionHandler() {
return new SpinnakerServerExceptionHandler();
}

@Bean
@ConditionalOnMissingBean(ObjectMapper.class)
ObjectMapper retrofitObjectMapper() {
Expand Down

0 comments on commit 41c01eb

Please sign in to comment.