fixed http-error-handling