Added error callback, fixed for my api proxy