Fix wrong error message

closes #1466
- added status code for error object
- added test for frontend errors
Merge pull request #1489 from sebgie/issue#1466

Fix wrong error message