Redirect to a custom error page when specific error is returned by prosody module

Good day to everyone.

We have prosody plugin which returns some error based on the logic

session.send(st.error_reply(stanza, "cancel", "not-allowed", "Can't join to this meeting due to..."));

When this error occurs, the user is redirected to an authError.html.

I would like to change “session.send” in this way

session.send(st.error_reply(stanza, "cancel", "my-custom-result", "Can't join to this meeting due to..."));

and the redirect user to my own page like “myError.html”.

Is there any way to achieve this?

Thank you.

Not without changing lib-jitsi-meet and jitsi-meet.