Repository: incubator-zeppelin Updated Branches: refs/heads/master db418bbe2 -> 6a096c90d
ZEPPELIN-263: Don't pass Exception objects to JsonResponse. Author: Rohit Agarwal <[email protected]> Closes #259 from mindprince/ZEPPELIN-263 and squashes the following commits: 5142394 [Rohit Agarwal] ZEPPELIN-263: Don't pass Exception objects to JsonResponse. 47f719c [Rohit Agarwal] ZEPPELIN-263: Don't pass Exception objects to JsonResponse. Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/6a096c90 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/6a096c90 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/6a096c90 Branch: refs/heads/master Commit: 6a096c90d9ef46c337b02995ae7caab8659768a9 Parents: db418bb Author: Rohit Agarwal <[email protected]> Authored: Thu Aug 27 11:41:33 2015 -0700 Committer: Lee moon soo <[email protected]> Committed: Fri Aug 28 18:56:46 2015 -0700 ---------------------------------------------------------------------- .../java/org/apache/zeppelin/rest/InterpreterRestApi.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/6a096c90/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java ---------------------------------------------------------------------- diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java index 1e2ade6..37db218 100644 --- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java +++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java @@ -32,6 +32,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.zeppelin.interpreter.Interpreter; import org.apache.zeppelin.interpreter.InterpreterException; import org.apache.zeppelin.interpreter.InterpreterFactory; @@ -115,9 +116,11 @@ public class InterpreterRestApi { UpdateInterpreterSettingRequest.class); interpreterFactory.setPropertyAndRestart(settingId, p.getOption(), p.getProperties()); } catch (InterpreterException e) { - return new JsonResponse(Status.NOT_FOUND, e.getMessage(), e).build(); + return new JsonResponse( + Status.NOT_FOUND, e.getMessage(), ExceptionUtils.getStackTrace(e)).build(); } catch (IOException e) { - return new JsonResponse(Status.INTERNAL_SERVER_ERROR, e.getMessage(), e).build(); + return new JsonResponse( + Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e)).build(); } InterpreterSetting setting = interpreterFactory.get(settingId); if (setting == null) { @@ -146,7 +149,8 @@ public class InterpreterRestApi { try { interpreterFactory.restart(settingId); } catch (InterpreterException e) { - return new JsonResponse(Status.NOT_FOUND, e.getMessage(), e).build(); + return new JsonResponse( + Status.NOT_FOUND, e.getMessage(), ExceptionUtils.getStackTrace(e)).build(); } InterpreterSetting setting = interpreterFactory.get(settingId); if (setting == null) {
