REST API now returning exceptions as HTML?
Wednesday, 21 March 2012 · 2 messages · last reply 22 Mar 2012
CD
Charles Duffy21 Mar 2012 22:03 #
Howdy --
Historically, the BaseX REST API has handled exceptions by returning only the exception content itself.
I just ran a build against current SVN, and received the following:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 400 Stopped at line 1, column 75:
[XPST0017] Unknown Java function
'net.dyfis.svnkit_wrapper.SvnWrapper.cat(...)'.</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Problem accessing /rest. Reason:
<pre> Stopped at line 1, column 75:
[XPST0017] Unknown Java function
'net.dyfis.svnkit_wrapper.SvnWrapper.cat(...)'.</pre></p><hr
/><i><small>Powered by Jetty://</small></i><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</body>
</html>Is this now desired/documented/ongoing behavior?
CG
Christian Grün22 Mar 2012 00:03 #
Quoted text · Charles Duffy · 2 lines
> Historically, the BaseX REST API has handled exceptions by returning only > the exception content itself.
..wow, you're always up to date ;)
We played around with the return message, and we're not sure if we should go for a complete HTML-based error message or limit the feedback to a simple text message. The next commit will restore the old state.
Written for BaseX 7.1. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery