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
Merge pull request #1815 from ErisDS/more-tests

Error handling simplification & test improvements