put curl errors in env to print them later