improve curl error logging
Merge https://github.com/friendica/red into zpull