fix env toggling, improve error page styling
Merge pull request #8713 from goshakkk/better-error-page

Fix env toggling, improve error page styling