ok($response->toArray($expand = Input::get('expand',''))); } catch (ValidationException $ex1) { Log::warning($ex1); return $this->error412(array($ex1->getMessage())); } catch(EntityNotFoundException $ex2) { Log::warning($ex2); return $this->error404(array('message'=> $ex2->getMessage())); } catch (\Exception $ex) { Log::error($ex); return $this->error500($ex); } } }