[core] fixing an issue on the 500 error trigger + templating first logics