Yeah, ideally the controller would send a JSON error document when it
catches the exception - which should happen anyway with _format: json.

On Fri, Jun 07, 2013 at 03:04:29AM -0700, David Buchmann wrote:
>    In Tests/Unit/Tree/PhpcrOdmTreeTest.php:
> 
>  > +
>  > +        $res = $this->getTreeInstance()->move($sourcePath, $targetPath);
>  > +        $this->assertEquals($targetPath.'/'.$name, $res);
>  > +    }
>  > +
>  > +    public function testMoveNotFound()
>  > +    {
>  > +        $this->dm->expects($this->once())
>  > +            ->method('find')
>  > +            ->will($this->returnValue(null));
>  > +
>  > +        $res = $this->getTreeInstance()->move('foo', 'bar');
>  > +
>  > +        // this should surely be an exception
>  > +        $this->assertEquals(
>  > +            'No document found at "foo"', $res
> 
>    agreed. but we need a way how to communicate errors to the frontend. just
>    having error 500 and js does nothing would be a bad solution.
> 
>    —
>    Reply to this email directly or [1]view it on GitHub.
> 
> References
> 
>    Visible links
>    1. https://github.com/symfony-cmf/TreeBrowserBundle/pull/38/files#r4585862