Fix bug in error handling
Avoid modifing the global errMsg object
Avoid errors on accessing twice HTTP_CONNECTION_ERROR property