Invoke OnError if Http status code is not OK