google-nomulus/java/google/registry/tools
nickfelt 16832323d0 Make ListObjectsAction return 200 when sending JSON error
This fixes a bug in the interaction between ListObjectsAction and ListObjectsCommand/AppEngineConnection.  ListObjectsAction was returning HTTP status code 400 when it caught an IAE, but also attempting to return a JSON response payload of {"status": "error", "error": "<exception message>"}.  However, AppEngineConnection treats any HTTP error response as more like a crash on the server side - it attempts to scrape the error message out of the autogenerated HTML that AppEngine produces for uncaught exceptions, and throws an exception, killing ListObjectsCommand before it can extract the JSON which contains the nicer error (that stating the missing field, etc versus just "400 Bad Request").

The fix is just to have ListObjectsAction return a 200 and the error message so that ListObjectsCommand can correctly handle it.

I also de-scoped the catch to only catching IAE, since catching Exception was overbroad, and the only "expected" exception to be thrown is an IAE from the checkArgument() that tests if the requested fields all exist.  Any other kinds of exceptions should actually just bubble up and kill the action, and get the regular AppEngineConnection error treatment.

I also added "billingId" as an alias for "billingIdentifier", parallel to clientId/clientIdentifier, since that's why I came across this issue in the first place.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148248834
2017-02-27 11:10:37 -05:00
..
javascrap Fix resource mismatch problem in FixDomainNameserverKeysCommand 2017-02-14 12:16:55 -05:00
params Align parameter formats for zone data commands 2017-02-22 11:46:07 -05:00
resources Add Client-side OAuth2 to HTTP connections 2017-02-17 12:17:53 -05:00
server Make ListObjectsAction return 200 when sending JSON error 2017-02-27 11:10:37 -05:00
soy Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
sql Cut over to synthetic OneTime billing events 2017-02-09 14:24:42 -05:00
AllocateDomainCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
AppEngineConnection.java Daggerize XsrfTokenManager 2017-02-22 11:43:10 -05:00
AppEngineConnectionFlags.java Add Client-side OAuth2 to HTTP connections 2017-02-17 12:17:53 -05:00
AuctionStatusCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
BigqueryCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
BigqueryCommandUtilities.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
BigqueryParameters.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
BUILD Add Client-side OAuth2 to HTTP connections 2017-02-17 12:17:53 -05:00
CanonicalizeLabelsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CheckSnapshotCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
Command.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CommandUtilities.java Fix CommandUtilities to fail gracefully if stdin is unavailable 2017-02-06 16:45:23 -05:00
ConfirmingCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ConvertIdnCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateAnchorTenantCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateAuctionCreditsCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
CreateContactCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateCreditBalanceCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateCreditCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateDomainCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateHostCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateLrpTokensCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateOrUpdatePremiumListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateOrUpdateRegistrarCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateOrUpdateReservedListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateOrUpdateTldCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreatePremiumListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateRegistrarCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateRegistrarGroupsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateReservedListCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
CreateTldCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DefaultRequestFactoryModule.java Put the path to client_secrets in a config option. 2017-02-22 11:49:03 -05:00
DeleteCreditCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DeleteDomainCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DeleteEntityCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DeletePremiumListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DeleteReservedListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DomainApplicationInfoCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DomainCheckClaimsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DomainCheckCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
DomainCheckFeeCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EncryptEscrowDepositCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EppToolCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
EscrowDepositEncryptor.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ExecuteEppCommand.java Fix two Gauava 20 deprecations across the tools package 2017-02-02 16:54:28 -05:00
GenerateApplicationsReportCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GenerateAuctionDataCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GenerateDnsReportCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GenerateEscrowDepositCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
GenerateLordnCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GenerateZoneFilesCommand.java Align parameter formats for zone data commands 2017-02-22 11:46:07 -05:00
GetApplicationCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetApplicationIdsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetAppliedLabelsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetClaimsListCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
GetContactCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetDomainCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetEppResourceCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetHistoryEntriesCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetHostCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetLrpTokenCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetRegistrarCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetResourceByKeyCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
GetSchemaCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetSchemaTreeCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetTldCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GhostrydeCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
HashCertificateCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
HelpCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
Injector.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListCreditsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListCursorsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListDomainsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListHostsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListObjectsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListPremiumListsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListRegistrarsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListReservedListsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListTldsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
LoadSnapshotCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
logging.properties mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
LoggingParameters.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
MakeBillingTablesCommand.java Cut over to synthetic OneTime billing events 2017-02-09 14:24:42 -05:00
MutatingCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
MutatingEppToolCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
package-info.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
PendingEscrowCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
PublishDetailReportCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RegistrarActivityReportCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RegistrarContactCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RegistryCli.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
RegistryTool.java Delete the unsafe DeleteEppResourceCommand 2017-02-17 12:16:27 -05:00
RegistryToolComponent.java Daggerize XsrfTokenManager 2017-02-22 11:43:10 -05:00
RegistryToolEnvironment.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RegistryToolModule.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ResaveEntitiesCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
ResaveEnvironmentEntitiesCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ResaveEppResourceCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
SendEscrowReportToIcannCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ServerSideCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
SetupOteCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UniformRapidSuspensionCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdateApplicationStatusCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
UpdateClaimsNoticeCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
UpdateCreditsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdateCursorsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdatePremiumListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdateRegistrarCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdateReservedListCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
UpdateServerLocksCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdateSmdCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
UpdateTldCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UploadClaimsListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UserIdProvider.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ValidateEscrowDepositCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ValidateLoginCredentialsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
VerifyOteCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
WhoisQueryCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00