Permalink
Browse files

tolerate null reason from jetty response.

  • Loading branch information...
1 parent 566f813 commit c7fad27156ae22a8b143d111278a5a9c47d3f5f5 Robert Newson committed May 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/github/rnewson/couchdb/lucene/JSONErrorHandler.java
@@ -41,7 +41,7 @@ public void handle(String target, HttpServletRequest request, HttpServletRespons
connection.getRequest().setHandled(true);
final String reason = connection.getResponse().getReason();
try {
- if (reason.startsWith("{")) {
+ if (reason != null && reason.startsWith("{")) {
ServletUtils.sendJsonError(request, response, connection.getResponse().getStatus(),
new JSONObject(reason));
} else {

0 comments on commit c7fad27

Please sign in to comment.