asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xikui Wang (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [ASTERIXDB-2057][API] Add detailed error message for 500 in ...
Date Tue, 22 Aug 2017 20:57:02 GMT
Xikui Wang has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1959

Change subject: [ASTERIXDB-2057][API] Add detailed error message for 500 in REST API
......................................................................

[ASTERIXDB-2057][API] Add detailed error message for 500 in REST API

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
1. Add error message to 500 response.
2. Specify proper content type for Ansible query execution script, so
LIKE % can be parsed properly.

Change-Id: I17759141116a1baf878abf7d5ec70295a18946e8
---
M asterixdb/asterix-benchmark/src/main/resources/ansible/runquery.yml
M hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/59/1959/1

diff --git a/asterixdb/asterix-benchmark/src/main/resources/ansible/runquery.yml b/asterixdb/asterix-benchmark/src/main/resources/ansible/runquery.yml
index ef3c2a5..a8af486 100644
--- a/asterixdb/asterix-benchmark/src/main/resources/ansible/runquery.yml
+++ b/asterixdb/asterix-benchmark/src/main/resources/ansible/runquery.yml
@@ -34,6 +34,8 @@
         url: "{{ service }}"
         method: POST
         body: "{{ lookup('file', query_file ) }}"
+        headers:
+          Content-Type: "text/plain"
         timeout: 3600
       register: response
 
diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
index e89ed56..46b693b 100644
--- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
+++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
@@ -72,7 +72,7 @@
             }
         } catch (Exception e) {
             LOGGER.log(Level.SEVERE, "Failure Submitting HTTP Request", e);
-            respond(ctx, request.protocolVersion(), HttpResponseStatus.INTERNAL_SERVER_ERROR);
+            respond(ctx, request.protocolVersion(), new HttpResponseStatus(500, e.getMessage()));
         }
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1959
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17759141116a1baf878abf7d5ec70295a18946e8
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Xikui Wang <xkkwww@gmail.com>

Mime
View raw message