We have a page that uses several themes, but the 404 pages should all look the same.
So, for all themes except one we need a rule that switches to another theme when the URL does not match any content.
There are ways to choose the theme by the current URL, like using the context module, or implementing a
ThemeNegotiatorInterface, and we use them to assign our themes to certain parts of the website.
It seems that the
ThemeNegotiatorInterface is not used when delivering a 404 error page.
So, how can we switch the theme according to the http status code?