Closed abhinav82ify closed 1 year ago
Hi @abhinav82ify,
I just created this repository with Kotlin to validate this issue and it is working as expected.
Would you like to check, please?
Hi @ClaudenirFreitas, thanks for the solution. I was able to fix it. There were some dependency mismatch which were causing this.
Expected behavior
As per https://netflix.github.io/dgs/error-handling/, it is fairly simple to register a custom exception handler. I just need to add a new custom exception handler class and return error response based on the type of exception.
Actual behavior
When my Data fetcher (written in Kotlin) throws an exception, it is never intercepted by the custom exception handler and always throws a generic response
Internal Server Error(s) while executing query
. I have tried this a 100 times with a debugger now and it never seems to reach the custom exception handler.Steps to reproduce