Skip to content

Commit d0fc33f

Browse files
Kai SongKai Song
authored andcommitted
Put back some code due to broker dependencies
1 parent d79b3cf commit d0fc33f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

IdentityCore/src/network/request_server_telemetry/MSIDAADTokenRequestServerTelemetry.m

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,19 @@ - (void)handleError:(nullable NSError *)error
5454
MSID_LOG_WITH_CTX(MSIDLogLevelInfo, context, @"Error is nil, reset MSID telemetry");
5555
}
5656

57-
NSString *errorString = [error msidServerTelemetryErrorString];
57+
[self.lastRequestTelemetry updateWithApiId:self.currentRequestTelemetry.apiId
58+
errorString:[error msidServerTelemetryErrorString]
59+
context:context];
60+
}
61+
62+
- (void)handleError:(nullable NSError *)error
63+
errorString:(NSString *)errorString
64+
context:(id<MSIDRequestContext>)context
65+
{
66+
if (error == nil) {
67+
MSID_LOG_WITH_CTX(MSIDLogLevelInfo, context, @"Error is nil, reset MSID telemetry");
68+
}
69+
5870
[self.lastRequestTelemetry updateWithApiId:self.currentRequestTelemetry.apiId
5971
errorString:errorString
6072
context:context];

IdentityCore/src/network/request_server_telemetry/MSIDHttpRequestServerTelemetryHandling.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ NS_ASSUME_NONNULL_BEGIN
3232
- (void)handleError:(nullable NSError *)error
3333
context:(id<MSIDRequestContext>)context;
3434

35+
- (void)handleError:(nullable NSError *)error
36+
errorString:(NSString *)errorString
37+
context:(id<MSIDRequestContext>)context;
38+
3539
- (void)setTelemetryToRequest:(id<MSIDHttpRequestProtocol>)request;
3640

3741
@end

0 commit comments

Comments
 (0)