Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
RESTXQ
(edit)
Revision as of 16:53, 13 August 2015
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>
Dirk
administrator, editor
28
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Request account
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main Page
Table of Contents
Recent Changes
Random Page
PDF Version
Tools
Special pages
Printable version