Skip to content

Commit

Permalink
Fix reliability issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Sep 27, 2024
1 parent cde6dcd commit 2d9ccc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ private KiotaClientFactory() {}
* @return an OkHttpClient Builder instance.
*/
@Nonnull public static OkHttpClient.Builder create(@Nullable final List<Interceptor> interceptors) {
if (interceptors == null) {
return create();
}
return create(
(new ArrayList<>(interceptors)).toArray(new Interceptor[interceptors.size()]));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public AuthorizationHandler(
return response;
}

span.addEvent("com.microsoft.kiota.handler.authorization.challenge_received");
if (span != null)
span.addEvent("com.microsoft.kiota.handler.authorization.challenge_received");

// We cannot replay one-shot requests after claims challenge
final RequestBody requestBody = request.body();
Expand Down

0 comments on commit 2d9ccc7

Please sign in to comment.