Skip to content

Commit

Permalink
refactor(Echoservice): make changes to Echoservice use customSpinnake…
Browse files Browse the repository at this point in the history
…r Exceptions using SpinnakerRetrofitErrorHandler (#1124)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Luthan95 and mergify[bot] committed Sep 10, 2023
1 parent b2f5cee commit ae0d3d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions igor-web/igor-web.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies {
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor platform("io.spinnaker.kork:kork-bom:$korkVersion")
testAnnotationProcessor "org.projectlombok:lombok"
implementation "io.spinnaker.kork:kork-retrofit"

runtimeOnly "org.springframework.boot:spring-boot-properties-migrator"
implementation "org.springframework.boot:spring-boot-starter-actuator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.netflix.spinnaker.config.DefaultServiceEndpoint
import com.netflix.spinnaker.config.okhttp3.OkHttpClientProvider
import com.netflix.spinnaker.igor.IgorConfigurationProperties
import com.netflix.spinnaker.igor.history.EchoService
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerRetrofitErrorHandler
import com.netflix.spinnaker.retrofit.Slf4jRetrofitLogger
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.annotation.Bean
Expand Down Expand Up @@ -49,6 +50,7 @@ class EchoConfig {
.setClient(new Ok3Client(okHttpClientProvider.getClient(new DefaultServiceEndpoint("echo", address))))
.setLogLevel(retrofitLogLevel)
.setLog(new Slf4jRetrofitLogger(EchoService))
.setErrorHandler(SpinnakerRetrofitErrorHandler.getInstance())
.build()
.create(EchoService)
}
Expand Down

0 comments on commit ae0d3d5

Please sign in to comment.