Skip to content

Commit

Permalink
fix: do not swallow exception on http client errors
Browse files Browse the repository at this point in the history
  • Loading branch information
easimon committed Feb 4, 2024
1 parent 318e819 commit ef77464
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class ShellyClient(
restTemplate.getForObject<T>(url)
}
}.getOrElse { ex ->
logger.warn { "GET ${url}: HTTP Request failure: ${ex.message}" }
logger.warn(ex) { "GET ${url}: HTTP Request failure: ${ex.message}" }
null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class ShellyGen2Client(
configProperties: ShellyConfigProperties,
restTemplateBuilder: RestTemplateBuilder
) : ShellyClient(this) {

companion object : KLogging()

@Cacheable("Gen2ShellyStatus", sync = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package click.dobel.shelly.exporter.client.api.gen2
import com.fasterxml.jackson.annotation.JsonProperty
import java.util.EnumSet

@Suppress("LongParameterList")
class Gen2ShellyStatus(
//@JsonProperty("ble")

Expand Down

0 comments on commit ef77464

Please sign in to comment.