Changes

Jump to navigation Jump to search
354 bytes added ,  16:53, 13 August 2015
no edit summary
{
'User "' || $user || '" is unknown'
};
</pre>
 
An XQuery error in a RESTXQ context delivers by default a HTTP status code 400 error back to the client. However, you can also define a custom error code by using the third argument of the error function
 
<pre class="brush:xquery">
declare
%rest:path("/teapot")
function page:teapot()
{
fn:error(xs:QName('error'), "I'm a teapot", 418)
};
</pre>
administrator, editor
28

edits

Navigation menu