handle errors in the frontend in case PHP explodes