Skip to content

Commit e1256aa

Browse files
Add HTTP Status log to IOS (#1096)
Add missing HTTP status code to IOS build on task completion Resolves: OLPEDGE-2340 Signed-off-by: Serhii Lozynskyi <[email protected]>
1 parent c0dc78f commit e1256aa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

olp-cpp-sdk-core/src/http/ios/OLPHttpTask.mm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,18 @@ - (BOOL)cancel {
141141
#pragma mark - Response handlers
142142

143143
- (void)didCompleteWithError:(NSError*)error {
144+
int status = 0;
145+
if (self.responseData)
146+
{
147+
status = self.responseData.status;
148+
}
149+
144150
OLP_SDK_LOG_DEBUG_F(kLogTag,
145151
"Task is completed, request_id=%llu, url=%s, "
146-
"task_id=%u, error=%i",
152+
"task_id=%u, error=%i, status=%i",
147153
self.requestId, [self.url UTF8String],
148154
(unsigned int)self.dataTask.taskIdentifier,
149-
(int)error.code);
155+
(int)error.code, status);
150156

151157
OLPHttpTaskCompletionHandler completionHandler = nil;
152158
@synchronized(self) {

0 commit comments

Comments
 (0)