Fixed error logging for http calls