ArcBees / GWTP

A complete model-view-presenter framework to simplify your next GWT project.
Other
335 stars 132 forks source link

RestDispatch: Missing servlet response message on error #829

Closed jswart closed 5 years ago

jswart commented 5 years ago

With the following code:

dispatcher.execute(sendResource.send(object), new RestCallback<Void>() {
      @Override
      public void onFailure(final Throwable caught) {
        consoleLog("a:" + caught.toString());
        consoleLog("b:" + caught.getMessage());
      }

      @Override
      public void onSuccess(final Void result) {
        //...
      }

      @Override
      public void setResponse(final Response response) {
        consoleLog("c:" + response.getStatusCode());
        consoleLog("t:" + response.getStatusText());
      }
    });
  }

I receive this response in debug:

a:com.gwtplatform.dispatch.shared.ActionException: {"code":400,"message":"Could not create job. Contact: support"} b:{"code":400,"message":"Could not create job. Contact: support"} c:400 t:{"code":400,"message":"Could not create job. Contact: support"}

I receive this response in production:

c:400 t: a:com.gwtplatform.dispatch.shared.ActionException: b:

How do I get production to match what I get in local debug mode?

jswart commented 5 years ago

Looks like it's related to something with my servlet code, which makes more sense than it being a bug/issue with gwtp.