Saml identity provider error handling

Hello,

I use keycloak 19 for integrating to an external identity provider by saml. If I click ‘cancel’ in external IDP authentication, it send to keycloak saml response with following error:

saml2p:Status
<saml2p:StatusCode Value=“urn:oasis:names:tc:SAML:2.0:status:Requester”>
<saml2p:StatusCode Value=“urn:oasis:names:tc:SAML:2.0:status:AuthnFailed” />
</saml2p:StatusCode>
saml2p:StatusMessageAn error occurred.</saml2p:StatusMessage>
</saml2p:Status>
</saml2p:Response>

Keycloak shows ‘We are sorry…’ page with ‘An error occurred’ text. Preferred functionality is to get directly back to application where started authentication flow.
If I configure in keycloak admin console realm → clients → -> Home URL url where I want get after clicking ‘cancel’, keycloak still opens 'We are sorry…" page, this time with link to correct place.This is a bit better, but not what I want.

The external IDP works like it does, I cannot change that, just have to deal with its response.

How I configure keycloak so that it can redirect back to application without showing ‘We are sorry…’ page?

regards, Matti