I'm using Symfony 2.8
I have a POST method root. The return format is json.
app_patient_create:
path: /
methods: [POST]
defaults:
_controller: App:Patient:create
_format: json
_angular_safe: true
In a Listener in this root, i have an exception.
throw new Exception\MaxPointsException();
This is the custom exception :
namespace App\Training\Exception;
class MaxPointsException extends \LogicException
{
public function __construct()
{
parent::__construct('Vous avez atteint le nombre maximal de patients inclus dans votre offre découverte. Pour continuer à profiter du site, veuillez vous abonner');
}
}
In dev environnement, the message is return :
But not in prod environnement :
Did you know why?
I use an HTTP 409 reponse for recognize my exception.