@loostro 
I think we still have a problem here.
In ``getObject`` function, if exception is thrown, ``${{ builder.ModelClass }}`` will not be defined.
IMO, you should replace this line by:

``return $this->error{{ action.name|capitalize }}(isset(${{ builder.ModelClass }})?${{ builder.ModelClass }}:null, $e);``
and change ``error{{ action.name|capitalize }}`` definition by:
``public function error{{ action.name|capitalize }}(${{ builder.ModelClass }} = null, $e)``