Retrieving the client_id on the custom error page

I’m attempting to show the client_id on the custom error page as I’m going to use it to forward the user to the specific error page depending on the application, however it never renders on the page nor can I see it in the console.log.

I’m using the api approach to send down html, here’s what I’m sending:

{"error_page": {"html": "<p>ClientId: {{client_id}}</p>" }}

but this renders nothing:
Screenshot 2021-01-20 at 14.43.20

What should I send to see the id?

Thanks

It appears that this issue is related to this post wherein those parameters/objects just aren’t present at that point as they have been removed from session.

So is there an alternative to identifying the application that this error occurred in?