jose-correia commented on code in PR #59:
URL: 
https://github.com/apache/sling-org-apache-sling-distribution-core/pull/59#discussion_r888746447


##########
src/main/java/org/apache/sling/distribution/servlet/DistributionAgentServlet.java:
##########
@@ -71,7 +73,7 @@ protected void doPost(SlingHttpServletRequest request, 
SlingHttpServletResponse
                 log.debug("distribution response : {}", distributionResponse);
             } catch (Throwable e) {
                 log.error("an unexpected error has occurred", e);
-                ServletJsonUtils.writeJson(response, 503, "an unexpected error 
has occurred", null);
+                ServletJsonUtils.writeJson(response, 503, e.getMessage(), 
null);

Review Comment:
   I decided to implement an initial approach to a more structured way of 
having well-defined external error codes and improve how we propagate the 
exception metadata. What do you think?
   
   
[https://github.com/apache/sling-org-apache-sling-distribution-core/pull/60](https://github.com/apache/sling-org-apache-sling-distribution-core/pull/60)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to