You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karolis Mackevicius (JIRA)" <ji...@apache.org> on 2017/03/19 10:25:42 UTC

[jira] [Comment Edited] (SLING-6515) Sling Post Processor considering validation model as well

    [ https://issues.apache.org/jira/browse/SLING-6515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931641#comment-15931641 ] 

Karolis Mackevicius edited comment on SLING-6515 at 3/19/17 10:25 AM:
----------------------------------------------------------------------

It is not possible to influence Error Response Message with the current AbstractPostResponse.java:220 setError method implementation. 
In case of exception it creates a new SlingException and instead of taking original Throwable error as parameter, sets null.

AbstractPostResponse method:
public void setError(Throwable *error*) {
        setProperty(PN_ERROR, new SlingException("Exception during response processing.", *null*));
}


was (Author: kama):
It is not possible to influence Error Response Message with the current AbstractPostResponse.java:220 setError method implementation. 
In case of exception it creates a new SlingException and instead of taking original Throwable error as parameter, sets null.

AbstractPostResponse method:
public void setError(Throwable *error*) {
        setProperty(PN_ERROR, new SlingException("Exception during response processing.", *null*));
}

> Sling Post Processor considering validation model as well
> ---------------------------------------------------------
>
>                 Key: SLING-6515
>                 URL: https://issues.apache.org/jira/browse/SLING-6515
>             Project: Sling
>          Issue Type: Improvement
>          Components: Validation
>            Reporter: Konrad Windszus
>
> It should be possible to optionally enable a Sling Post Processor which validates the incoming parameters against a validation model. In case the incoming parameters are not valid, there must be an error response. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)