Skip to content

Commit

Permalink
Always try to parse request so we also have data on request errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jerbob92 committed May 12, 2020
1 parent b33fe4f commit ae5afe8
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions KlippaOCRAPI/Activities/ParseDocumentActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,14 @@ protected override void EndExecute(AsyncCodeActivityContext context, IAsyncResul
HTTPResponseHeaders.Set(context, response.Headers);
RequestSuccesful.Set(context, requestSuccesful);

if (requestSuccesful)
try
{
try
{
APIResponse deserializedAPIResponse = JsonConvert.DeserializeObject<APIResponse>(output);
APIResponse.Set(context, deserializedAPIResponse);
}
catch (Exception)
{

}
APIResponse deserializedAPIResponse = JsonConvert.DeserializeObject<APIResponse>(output);
APIResponse.Set(context, deserializedAPIResponse);
}
catch (Exception)
{

}
}
catch (OperationCanceledException)
Expand Down

0 comments on commit ae5afe8

Please sign in to comment.