Implement promise for save and implemente template for error page