src/main/java/org/apache/sling/servlets/post/PostResponseWithErrorHandling.java [33:59]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	@Override
    public PostResponse createPostResponse(SlingHttpServletRequest request) {
		if (isSendError(request)) {
			return new HtmlResponse() {

				@Override
				protected void doSend(HttpServletResponse response) throws IOException {
					if (!this.isSuccessful()) {
						response.sendError(this.getStatusCode(), this.getError().toString());
						return;
					}else{
						super.doSend(response);
					}
				}
			};
		}else{
			return null;
		}
	}

	protected boolean isSendError(SlingHttpServletRequest request){
		boolean sendError=false;
		String sendErrorParam=request.getParameter(SlingPostConstants.RP_SEND_ERROR);
		if (sendErrorParam!=null && "true".equalsIgnoreCase(sendErrorParam)){
			sendError=true;
		}
		return sendError;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/sling/servlets/post/impl/PostResponseWithErrorHandling.java [38:64]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	@Override
    public PostResponse createPostResponse(SlingHttpServletRequest request) {
		if (isSendError(request)) {
			return new HtmlResponse() {

				@Override
				protected void doSend(HttpServletResponse response) throws IOException {
					if (!this.isSuccessful()) {
						response.sendError(this.getStatusCode(), this.getError().toString());
						return;
					}else{
						super.doSend(response);
					}
				}
			};
		}else{
			return null;
		}
	}

	protected boolean isSendError(SlingHttpServletRequest request){
		boolean sendError=false;
		String sendErrorParam=request.getParameter(SlingPostConstants.RP_SEND_ERROR);
		if (sendErrorParam!=null && "true".equalsIgnoreCase(sendErrorParam)){
			sendError=true;
		}
		return sendError;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



