SuperManifestRefUpdatedListener: Do not return 500 via Response.withStatusCode

REST endpoints should throw an exception to indicate an internal server
error. RestApiServlet takes care to catch the exception and to return a
'500 Internal Server Error' response for it.

Returning 500 via Response.withStatusCode also works but messes up the
error metric. If no exception is thrown, then we can't log an exception
as the cause in the error metric and we fall back to using "_none" as
the cause (hard-coded in RestApiServlet). "_none" is not helpful, hence
fix the metric by throwing an exception, rather than returning a 500
response code with Response.withStatusCode.

Change-Id: Ic479a221985bf5d936fc88def24837d343c73dd5
Signed-off-by: Edwin Kempin <ekempin@google.com>
1 file changed
tree: 3024bc94b5ea488e609d8528ab65ab68ca091d7e
  1. java/
  2. javatests/
  3. BUILD
  4. external_plugin_deps.bzl
  5. LICENSE
  6. README.md
README.md

The plugin will update a superproject to contain the submodules defined in the manifest XML file whenever the manifest repo is changed.

For more information see the documentation or the build instructions