added errorCode in response to web when HTTP error occurs