Add request information to createPayPalOneTimePayment failure log

This commit is contained in:
ravi-signal 2025-01-14 08:45:22 -06:00 committed by GitHub
parent 2f51778421
commit ee1016523f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -94,8 +94,9 @@ class BraintreeGraphqlClient {
final CreatePayPalOneTimePaymentMutation.Data data = assertSuccessAndExtractDataFromApolloResponse(apolloResponse);
if (data.createPayPalOneTimePayment == null) {
logger.warn(
"createPayPalOneTimePayment requestId={} did not have any errors but data was null. response={}",
apolloResponse.extensions.getOrDefault("requestId", "<No-Request-Id>"), httpResponse.body());
"createPayPalOneTimePayment requestId={} currency={} amount={} did not have any errors but data was null. response={}",
apolloResponse.extensions.getOrDefault("requestId", "<No-Request-Id>"),
currency, amount, httpResponse.body());
throw new ServiceUnavailableException();
}
return data.createPayPalOneTimePayment;