public async Task<SubmitResponse> GetSubmitStatusAsync(IEnumerable<SubmitResult> submits)
{
try
{
string query = BuildQueryString(submits);
// If the request contains invalid parameters, the server will return
// "400 Bad Request" and we'll end up in the first catch block.
string response = await WebHelper.SendGet(STATUS_URL, query);
return parser.ParseSubmitResponse(response);
}
catch (WebException e)
{
// Handle bad requests gracefully.
return CreateErrorResponse(e.Response as HttpWebResponse);
}
catch (Exception e)
{
throw e;
}
}