Skip to content

Commit 46dfe76

Browse files
authored
Add note about RPC_DEADLINE_TOO_SHORT to SetCustomClientTimeouts (#664)
Mirrors change from PHP in googleads/google-ads-php#832.
1 parent bec9265 commit 46dfe76

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

google-ads-examples/src/main/java/com/google/ads/googleads/examples/misc/SetCustomClientTimeouts.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ private void makeServerStreamingCall(GoogleAdsClient googleAdsClient, Long custo
109109
.setQuery("SELECT campaign.id FROM campaign")
110110
.build(),
111111
// Sets the timeout to use.
112+
// Note: This overrides the default value and can lead to
113+
// RequestError.RPC_DEADLINE_TOO_SHORT errors when too small. We recommend
114+
// to do it only if necessary.
112115
GrpcCallContext.createDefault()
113116
.withTimeout(Duration.ofMillis(CLIENT_TIMEOUT_MILLIS)));
114117
// Iterates over all rows in all messages and collects the campaign IDs.

0 commit comments

Comments
 (0)