Skip to content

Commit

Permalink
refactor(integrations-gremlin): use SpinnakerRetrofitErrorHandler wit…
Browse files Browse the repository at this point in the history
…h GremlinService (#4676)

As part of the upgradation process of retrofit version to 2.x, this PR aims at ensuring the uniformity across all the retrofit client configurations.

Since the use of RetrofitError are not detected, no changes in the exception handler and no behaviour changes as well.
  • Loading branch information
Pranav-b-7 authored Mar 14, 2024
1 parent 74ba9ca commit ad53c17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions orca-integrations-gremlin/orca-integrations-gremlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
implementation(project(":orca-retrofit"))
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation("org.slf4j:slf4j-api")
implementation("io.spinnaker.kork:kork-retrofit")

testImplementation(project(":orca-core-tck"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.netflix.spinnaker.orca.config

import com.fasterxml.jackson.databind.PropertyNamingStrategy
import com.fasterxml.jackson.databind.SerializationFeature
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerRetrofitErrorHandler
import com.netflix.spinnaker.orca.gremlin.GremlinConverter
import com.netflix.spinnaker.orca.gremlin.GremlinService
import com.netflix.spinnaker.orca.jackson.OrcaObjectMapper
Expand Down Expand Up @@ -47,6 +48,7 @@ class GremlinConfiguration {
.setEndpoint(gremlinEndpoint)
.setClient(retrofitClient)
.setLogLevel(RestAdapter.LogLevel.BASIC)
.setErrorHandler(SpinnakerRetrofitErrorHandler.getInstance())
.setLog(RetrofitSlf4jLog(GremlinService::class.java))
.setConverter(GremlinConverter(mapper))
.build()
Expand Down

0 comments on commit ad53c17

Please sign in to comment.