mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Unify two exceptions that mean the same thing
These were historically separate due to the old flow structure, but now they should be one exception. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133984858
This commit is contained in:
parent
21a98b899c
commit
096877f03e
55 changed files with 163 additions and 211 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
package google.registry.flows.contact;
|
||||
|
||||
import static google.registry.flows.ResourceFlowUtils.loadResourceForQuery;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfoForResource;
|
||||
import static google.registry.model.EppResourceUtils.cloneResourceWithLinkedStatus;
|
||||
import static google.registry.model.eppoutput.Result.Code.SUCCESS;
|
||||
|
@ -37,7 +37,7 @@ import javax.inject.Inject;
|
|||
* ever been transferred. Any registrar can see any contact's information, but the authInfo is only
|
||||
* visible to the registrar that owns the contact or to a registrar that already supplied it.
|
||||
*
|
||||
* @error {@link google.registry.flows.exceptions.ResourceToQueryDoesNotExistException}
|
||||
* @error {@link google.registry.flows.ResourceFlowUtils.ResourceDoesNotExistException}
|
||||
*/
|
||||
public final class ContactInfoFlow extends LoggedInFlow {
|
||||
|
||||
|
@ -48,7 +48,7 @@ public final class ContactInfoFlow extends LoggedInFlow {
|
|||
|
||||
@Override
|
||||
public final EppOutput run() throws EppException {
|
||||
ContactResource contact = loadResourceForQuery(ContactResource.class, targetId, now);
|
||||
ContactResource contact = loadAndVerifyExistence(ContactResource.class, targetId, now);
|
||||
verifyOptionalAuthInfoForResource(authInfo, contact);
|
||||
if (!clientId.equals(contact.getCurrentSponsorClientId()) && !authInfo.isPresent()) {
|
||||
contact = contact.asBuilder().setAuthInfo(null).build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue