brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <>
Subject [GitHub] brooklyn-server pull request #571: Better error reporting
Date Fri, 03 Mar 2017 09:06:12 GMT
Github user ahgittin commented on a diff in the pull request:
    --- Diff: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/
    @@ -374,7 +378,13 @@ public Response createPoly(byte[] inputToAutodetectType) {
             if (spec != null) {
    -            return launch(potentialYaml, spec);
    +            try {
    +                return launch(potentialYaml, spec);
    +            } catch (Exception e) {
    +                Exceptions.propagateIfFatal(e);
    +                log.warn("Failed REST deployment launching "+spec+": "+e);
    +                throw WebResourceUtils.badRequest(e, "Error launching blueprint (autodetecting)");
    --- End diff --
    This seemed like the best status code to use and it's what we use on line 294/297.  Do
you think there's a better one?  If we do nothing it will give Internal Server Error which
seems worse?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message