@@ -537,9 +537,9 @@ public void doGet(final DBBroker broker, final Txn transaction, final HttpServle
537
537
LOG .debug (e .getMessage (), e );
538
538
}
539
539
if (MimeType .XML_TYPE .getName ().equals (mimeType )) {
540
- writeXPathException (response , HttpServletResponse .SC_INTERNAL_SERVER_ERROR , encoding , query , path , e );
540
+ writeXPathException (response , HttpServletResponse .SC_BAD_REQUEST , encoding , query , path , e );
541
541
} else {
542
- writeXPathExceptionHtml (response , HttpServletResponse .SC_INTERNAL_SERVER_ERROR , encoding , query ,
542
+ writeXPathExceptionHtml (response , HttpServletResponse .SC_BAD_REQUEST , encoding , query ,
543
543
path , e );
544
544
}
545
545
}
@@ -702,10 +702,10 @@ public void doPost(final DBBroker broker, final Txn transaction, final HttpServl
702
702
703
703
} catch (final XPathException e ) {
704
704
if (MimeType .XML_TYPE .getName ().equals (mimeType )) {
705
- writeXPathException (response , HttpServletResponse .SC_INTERNAL_SERVER_ERROR , encoding , null , path , e );
705
+ writeXPathException (response , HttpServletResponse .SC_BAD_REQUEST , encoding , null , path , e );
706
706
707
707
} else {
708
- writeXPathExceptionHtml (response , HttpServletResponse .SC_INTERNAL_SERVER_ERROR , encoding , null , path , e );
708
+ writeXPathExceptionHtml (response , HttpServletResponse .SC_BAD_REQUEST , encoding , null , path , e );
709
709
}
710
710
}
711
711
return ;
0 commit comments