Fix crash when bad HTTP credentials are provided