Handle error from okta

Hi i am using keycloak 19 with okta as external idp. if i try to login with a user that is valid in okta but does not have access to application, okta is returing error “access denied” . How do i handle this error on keycloak. Keycloak is simply redirecting to login screen. Can i show a custom error page based on the error ?

did you find any solutions to this?