Skip to content

Commit 1248ef9

Browse files
committed
Revert "Merge pull request #4640 from adamretter/hotfix/rest-internal-server-error"
This reverts commit 3c97f47, reversing changes made to 89109f6.
1 parent 3c97f47 commit 1248ef9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exist-core/src/main/java/org/exist/http/RESTServer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ public void doGet(final DBBroker broker, final Txn transaction, final HttpServle
537537
LOG.debug(e.getMessage(), e);
538538
}
539539
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);
541541
} else {
542-
writeXPathExceptionHtml(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, encoding, query,
542+
writeXPathExceptionHtml(response, HttpServletResponse.SC_BAD_REQUEST, encoding, query,
543543
path, e);
544544
}
545545
}
@@ -702,10 +702,10 @@ public void doPost(final DBBroker broker, final Txn transaction, final HttpServl
702702

703703
} catch (final XPathException e) {
704704
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);
706706

707707
} else {
708-
writeXPathExceptionHtml(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, encoding, null, path, e);
708+
writeXPathExceptionHtml(response, HttpServletResponse.SC_BAD_REQUEST, encoding, null, path, e);
709709
}
710710
}
711711
return;

0 commit comments

Comments
 (0)