mirror of
https://github.com/google/nomulus
synced 2026-07-07 00:27:12 +00:00
Make async flow logic handle missing client transaction IDs
Per EPP RFC 5730, the <clTRID> element is optional. However, we weren't handling it not being specified in asynchronous contact/host deletions because we were adding it directly as a parameter value on a task, which does not allow null and thus threw a NullPointerException. This fixes handling for nulls (the parameter isn't set at all) and adds a test. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=194123259
This commit is contained in:
@@ -83,10 +83,12 @@ public final class AsyncFlowEnqueuer {
|
||||
.countdownMillis(asyncDeleteDelay.getMillis())
|
||||
.param(PARAM_RESOURCE_KEY, resourceKey.getString())
|
||||
.param(PARAM_REQUESTING_CLIENT_ID, requestingClientId)
|
||||
.param(PARAM_CLIENT_TRANSACTION_ID, trid.getClientTransactionId())
|
||||
.param(PARAM_SERVER_TRANSACTION_ID, trid.getServerTransactionId())
|
||||
.param(PARAM_IS_SUPERUSER, Boolean.toString(isSuperuser))
|
||||
.param(PARAM_REQUESTED_TIME, now.toString());
|
||||
if (trid.getClientTransactionId().isPresent()) {
|
||||
task.param(PARAM_CLIENT_TRANSACTION_ID, trid.getClientTransactionId().get());
|
||||
}
|
||||
addTaskToQueueWithRetry(asyncDeletePullQueue, task);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user