okay that’s good to know, however we are using ktor in our project, please see the sample code below, currently I am just taking the exception as dynamic type and I want to know how can I get the error code and error response in catch block?
suspend fun getAccountNumbers(params: String=“”): List<String> {
try {
val response: HttpResponse =
httpClient.get(“$_BackendServerURL_”)
if (response.status == HttpStatusCode.OK) {
return response.body()
}
} catch (e: dynamic) {
console.log(“Error: “, e.message)
}
return _emptyList_()
}