Skip to content

Commit

Permalink
Merge pull request #122 from miguelhuertas/patch-1
Browse files Browse the repository at this point in the history
Update RequestService.cs
  • Loading branch information
Alfredo Fiebig authored Oct 26, 2020
2 parents c0f8471 + 559ceff commit 07a2174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Transbank/Common/RequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static string Perform<T>(BaseRequest request, Options options) where T :
{
var jsonObject = (JObject)JsonConvert.DeserializeObject(jsonResponse);
throw (T)Activator.CreateInstance(typeof(T), new object[] {
(int)response.StatusCode, $"Error message: {jsonObject.Value<string>("error_message")}"
(int)response.StatusCode, $"Error message: {jsonObject?.Value<string>("error_message")}"
});
}
return jsonResponse;
Expand Down

0 comments on commit 07a2174

Please sign in to comment.