Error handling simplification & test improvements

fixes #1266

- simplifies the check for if a theme has an error template
- adds more / better tests for error handling