HttpApi: changed error callback