mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Refactor out creation of server TRIDs so they can be tested
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=152837185
This commit is contained in:
parent
af942774f4
commit
8653d2f204
29 changed files with 174 additions and 62 deletions
|
@ -50,6 +50,7 @@ public final class EppController {
|
|||
@Inject EppMetric.Builder eppMetricBuilder;
|
||||
@Inject EppMetrics eppMetrics;
|
||||
@Inject BigQueryMetricsEnqueuer bigQueryMetricsEnqueuer;
|
||||
@Inject ServerTridProvider serverTridProvider;
|
||||
@Inject EppController() {}
|
||||
|
||||
/** Reads EPP XML, executes the matching flow, and returns an {@link EppOutput}. */
|
||||
|
@ -83,7 +84,8 @@ public final class EppController {
|
|||
Strings.repeat("=", 40));
|
||||
// Return early by sending an error message, with no clTRID since we couldn't unmarshal it.
|
||||
eppMetricBuilder.setStatus(e.getResult().getCode());
|
||||
return getErrorResponse(e.getResult(), Trid.create(null));
|
||||
return getErrorResponse(
|
||||
e.getResult(), Trid.create(null, serverTridProvider.createServerTrid()));
|
||||
}
|
||||
if (!eppInput.getTargetIds().isEmpty()) {
|
||||
eppMetricBuilder.setEppTarget(Joiner.on(',').join(eppInput.getTargetIds()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue