Changes

Jump to navigation Jump to search
155 bytes added ,  16:47, 16 February 2021
no edit summary
==Raise Errors==
If an error is raised during the evaluation of a RESTXQ function, an HTTP response {{Mark|Updated with the status BaseX 9.5:}} Status code {{Code|400 is generated. The response body contains the full error message and stack trace} changed to {{Code|500}.
If an error is raised during the evaluation of a RESTXQ function, an HTTP response with the status code 500 is generated. The response body contains the full error message and stack trace unless {{Option|RESTXQERRORS}} is disabled. With the {{Function|Web|web:error}} function, you can abort query evaluation and enforce a premature HTTP response with the supplied status code and response body text(and no stack trace):
<syntaxhighlight lang="xquery">
};
</syntaxhighlight>
 
The XQuery error code and the stack trace will be suppressed in the body of the HTTP response.
==Catch XQuery Errors==
=Changelog=
 
;Version 9.3
* Updated: [[#Raise Errors|Raise Errors]]: Status code {{Code|400} changed to {{Code|500}.
;Version 9.3
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu