add error msg to email failure response
build for prod