Others that might come here looking for the answer, Keycloak does not support Statuscodes for the error page, but by using custom templating for login, you can detect it yourself in the frontend. I found my solution here