Hi all,
when, in 7.8.x, I override the rest response in an RestXQ as in:

declare
%rest:path('testhead1')
%rest:HEAD
function test:myfunct1() {
  let $out := () (: also with let $out := "" :)
  <rest:response>
        <http:response status="404" reason="{$out}" />
   </rest:response> 
};

I get a null pointer exception from a calling http-client code (in the GUI the usual message "Improper use or potential Bug ...").

http:send-request(<http:request method="head" href="http://localhost:8984/testhead1" />)

If I omit the reason attribute alltogether it correctly defaults to the HTTP Phrase "Not Found".
Couldn't it be useful to handle the two cases in the same way?
Regards,
Marco.