RestXQ custom HTTP error code
JCJerome Chauveau10 May 2019 10:46 # Hi,
I am trying to return a custom http error code in my rxq webapp (jetty embeded) like is the documentation :
declare
%rest:path("/teapot")
function page:teapot() {
fn:error(xs:QName('error'), "I'm a teapot", 418)
};
My client always receive a 400 instead of 418.
Tests are running on BaseX912 & BaseX921.
Thank you for your time.
Regards,
Jérôme Chauveau
CGChristian Grün13 May 2019 12:20 # Dear Jérôme,
Thanks for your observation. I have readopted the processing of the XQuery error code; it’s working again in the latest snapshot [1].
Salutations,
Christian
[1] http://files.basex.org/releases/latest/
Quoted text · Jerome Chauveau · 21 lines
On Fri, May 10, 2019 at 10:46 AM Jerome Chauveau
<jerome.chauveau at unicaen.fr> wrote:
>
> Hi,
>
> I am trying to return a custom http error code in my rxq webapp (jetty embeded) like is the documentation :
>
> declare
> %rest:path("/teapot")
> function page:teapot() {
> fn:error(xs:QName('error'), "I'm a teapot", 418)
> };
>
> My client always receive a 400 instead of 418.
>
> Tests are running on BaseX912 & BaseX921.
> Thank you for your time.
>
> Regards,
>
> Jérôme Chauveau
⚡Generated with XQuery