I try to develop a REST API with GraphQL and Kotlin and I'm facing the following problem: I try to create a custom Exception that extends RuntimeException and implements GraphQLError and in Kotlin I can not do this because I'm receiveing this: Accidental override when using third party Java interface and extending RuntimeException in kotlin.
I resolve this problem with an workaround by creating a Java class for my CustomException.
But I don't know why, when I create a kotlin class that extends RuntimeException and implements GraphQLError, I need to override the getMessage() method from GraphQLError, but when I create a java class that extends RuntimeException and implements GraphQLError I don't need to override the getMessage() method from GraphQLError.
Thank you!