From 0d91d77a490f69b4cc00851a95108c17188d36cd Mon Sep 17 00:00:00 2001 From: Marat Al Date: Thu, 20 Jan 2022 18:39:51 +0100 Subject: [PATCH 1/2] Fixed invalid json error field name --- Source/ARTJsonLikeEncoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ARTJsonLikeEncoder.m b/Source/ARTJsonLikeEncoder.m index eb4adc1f5..efb9d26b6 100644 --- a/Source/ARTJsonLikeEncoder.m +++ b/Source/ARTJsonLikeEncoder.m @@ -694,7 +694,7 @@ - (ARTDevicePushDetails *)devicePushDetailsFromDictionary:(NSDictionary *)input ARTDevicePushDetails *devicePushDetails = [[ARTDevicePushDetails alloc] init]; devicePushDetails.state = [input artString:@"state"]; - NSDictionary *errorReason = [input valueForKey:@"errorReason"]; + NSDictionary *errorReason = [input valueForKey:@"error"]; if (errorReason) { devicePushDetails.errorReason = [ARTErrorInfo createWithCode:[[errorReason artNumber:@"code"] intValue] status:[[errorReason artNumber:@"statusCode"] intValue] message:[errorReason artString:@"message"]]; } From 957720743e195a5c7be724e4345e0561e1230e61 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Thu, 20 Jan 2022 18:40:53 +0100 Subject: [PATCH 2/2] Code formatting for readability --- Source/ARTJsonLikeEncoder.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/ARTJsonLikeEncoder.m b/Source/ARTJsonLikeEncoder.m index efb9d26b6..7a6e78e7a 100644 --- a/Source/ARTJsonLikeEncoder.m +++ b/Source/ARTJsonLikeEncoder.m @@ -696,7 +696,9 @@ - (ARTDevicePushDetails *)devicePushDetailsFromDictionary:(NSDictionary *)input devicePushDetails.state = [input artString:@"state"]; NSDictionary *errorReason = [input valueForKey:@"error"]; if (errorReason) { - devicePushDetails.errorReason = [ARTErrorInfo createWithCode:[[errorReason artNumber:@"code"] intValue] status:[[errorReason artNumber:@"statusCode"] intValue] message:[errorReason artString:@"message"]]; + devicePushDetails.errorReason = [ARTErrorInfo createWithCode:[[errorReason artNumber:@"code"] intValue] + status:[[errorReason artNumber:@"statusCode"] intValue] + message:[errorReason artString:@"message"]]; } devicePushDetails.recipient = [input valueForKey:@"recipient"];