-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
public function exceptionAction($type)
{
$serializer = $this->container->get('serializer');
/* move to rest.yml */
$map = array(
'not_authenticated' => array(
'message' => 'Not authenticated',
'code' => 401
)
);
$response = array('message' => $map[$type]['message']);
return new Response(
$serializer->serialize($response, 'json'),
$map[$type]['code']
);
}Reactions are currently unavailable