https://kotlinlang.org logo
#ktor
Title
# ktor
m

martmists

08/13/2022, 1:54 PM
Having an issue in ktor server (jvm, 2.1.0)
Copy code
kotlin.reflect.full.IllegalCallableAccessException: java.lang.IllegalAccessException: class kotlin.reflect.jvm.internal.calls.CallerImpl$FieldGetter cannot access a member of class team.luminescent.site.auth.DiscordAuthPrincipal with modifiers "private final"
The DiscordAuthPrincipal is just an oauth principal:
Copy code
data class DiscordAuthPrincipal(val accessToken: String, val refreshToken: String) : Principal {
    fun isValid(): Boolean {
        // Fetch API to do additional checks
    }
}
Code:
Copy code
exception<Exception> { call, err ->
            call.respondTemplate(HttpStatusCode.InternalServerError, "pages/error/500", mapOf(
                "error" to err.stackTraceToString()
            ))
        }
36 Views