Hello,
I'm using an AbstractResource to return JSON entities.

Problem is that it seems you cannot also return an error code and also the
JSON string with detailed message in case of error.
        response.setWriteCallback(new WriteCallback()
        {
            @Override
            public void writeData(final Attributes attributes) {
                   
((WebResponse)attributes.getResponse()).write(errorResponse);
                    ((WebResponse)attributes.getResponse()).sendError(503,
"Logical Error");
}
}

Because sendError begins with a checkHeader() method that throws a Header
was already written to response! error

Any ideas how I can get this working?
Thanks.

-----
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ResourceResponse-to-return-error-status-code-but-also-JSON-error-message-tp4189792p4189792.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to