Included entity type and id in error responses
Fixed issues introduced with all the refactoring