Add support for error handling in batched requests.