google-nomulus/java
guyben d618ae758b Throw exception when server returns error in ListObjectsCommand
ListObjectsCommand is a base class for a number of List commands that query the
tools server with the command input, and then show the user the server's reply.

For example, ListDomainsCommand queries ListDomainsAction with the input TLDs
from the user, and then prints the resulting domains for the user.

Currently, when the server query returns an error (because, e.g., the user of
ListDomainsCommand gave a non-existing TLD) - ListObjectsCommand just prints
the error message to stdout, and returns successfully.

That means that any automatic tool would think the command succeeded.

This CL changes the behavior of ListObjectsCommand to throw an exception with
the error message if the server returned an error. This results in the nomulus
command failing if the server encountered an error.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194393053
2018-05-05 23:31:09 -04:00
..
com/google/testing/builddefs Replace PACKAGE_NAME with package_name() in bzl files. 2018-04-02 16:18:55 -04:00
google/registry Throw exception when server returns error in ListObjectsCommand 2018-05-05 23:31:09 -04:00