[ 
https://issues.apache.org/jira/browse/SLING-11365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

José Correia updated SLING-11365:
---------------------------------
    Description: 
In 
[https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/master/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DistributionPublisher.java#L272]
 we are currently wrapping the exception that happens while trying to 
distribute content, which is resulting in the exception message for example:
{code:java}
org.apache.sling.distribution.common.DistributionException: Can't distribute 
package with size greater than 1 Byte, actual 4055{code}
 

We need to change this wrapping, in order to obtain a more structured message, 
including the same information that we are logging:
{code:java}
Failed to create content package for requestType=ADD, paths=[/content]. 
Error=Can't distribute package with size greater than 1 Byte, actual 4053{code}
 

This will allow for the content distribution API to deal with this error in a 
cleaner manner and provide more data to API users.

  was:
In 
[https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/master/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DistributionPublisher.java#L272]
 we are currently wrapping the exception that happens while trying to 
distribute content, which is resulting in the exception message for example:
{code:java}
org.apache.sling.distribution.common.DistributionException: Can't distribute 
package with size greater than 1 Byte, actual 4055{code}
 

We need to change this wrapping, in order to obtain a more structured message, 
including the same information that we are logging:
{code:java}
Failed to create content package for requestType=ADD, paths=[/content]. 
Error=Can't distribute package with size greater than 1 Byte, actual 4053{code}
 

This will allow for the content distribution API to deal with this error in a 
cleaner manner and provide more data to API users.

 


> Improve the exception handling of the DistributionPublisher.execute 
> --------------------------------------------------------------------
>
>                 Key: SLING-11365
>                 URL: https://issues.apache.org/jira/browse/SLING-11365
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>            Reporter: José Correia
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.1.28
>
>
> In 
> [https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/master/src/main/java/org/apache/sling/distribution/journal/impl/publisher/DistributionPublisher.java#L272]
>  we are currently wrapping the exception that happens while trying to 
> distribute content, which is resulting in the exception message for example:
> {code:java}
> org.apache.sling.distribution.common.DistributionException: Can't distribute 
> package with size greater than 1 Byte, actual 4055{code}
>  
> We need to change this wrapping, in order to obtain a more structured 
> message, including the same information that we are logging:
> {code:java}
> Failed to create content package for requestType=ADD, paths=[/content]. 
> Error=Can't distribute package with size greater than 1 Byte, actual 
> 4053{code}
>  
> This will allow for the content distribution API to deal with this error in a 
> cleaner manner and provide more data to API users.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to