After the exhaustion of API limit, exception is not coming to kernel.exception as mentioned in the docs. Instead of this custom message is throwing from the config.yml. I am using Symfony 3.4. Please can someone guide how to use custom exception class to handle the exception when the API limit will exhaust