Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Adding catch for ConnectTimeoutException in NodeClient
Browse files Browse the repository at this point in the history
  • Loading branch information
mjovanc committed Aug 5, 2023
1 parent c97e47f commit aca8f31
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
package org.kryptokrona.sdk.node.client

import io.ktor.client.call.*
import io.ktor.client.network.sockets.*
import io.ktor.client.plugins.*
import io.ktor.client.request.*
import io.ktor.http.*
Expand Down Expand Up @@ -76,6 +77,8 @@ class NodeClient(private val node: Node) {
logger.error("Error getting node information. Could not reach the server.", e)
} catch (e: UnresolvedAddressException) {
logger.error("Error getting node information. Could not resolve the address.", e)
} catch (e: ConnectTimeoutException) {
logger.error("Error getting node information. Connection timeout.", e)
}

return isSuccess
Expand Down

0 comments on commit aca8f31

Please sign in to comment.