Handle errors with proxy