Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpResponse.error missing body #80

Open
safar opened this issue Oct 17, 2016 · 1 comment
Open

HttpResponse.error missing body #80

safar opened this issue Oct 17, 2016 · 1 comment

Comments

@safar
Copy link

safar commented Oct 17, 2016

I am using Netty together with Comsat's webactors.

Body string set with co.paralleluniverse.comsat.webactors.HttpResponse.error() method is never displayed.

I have following block of code:

if (succeeded) {
  msg.getFrom().send(HttpResponse.ok(self(), msg, "JSON parsed successfully")
      .setContentType("text/plain").build());
} else {
  System.out.println("RPC failed");
  msg.getFrom().send(HttpResponse.error(self(), msg, 500, "RPC failed")
      .setContentType("text/plain").build());
}

When it succeeds it will print out "JSON parsed successfully" in Response body, but if it fails it returns 500 Internal server error without body string that was set to "RPC failed".

Here is the output of Postman for both cases:

  • 200 OK
    ok
  • 500 Internal server error
    error

Can you please confirm if it is a bug or there is something else at hand here?

@pron
Copy link
Contributor

pron commented Oct 17, 2016

Hi.
The best way to get this addressed as quickly as possible is for you to troubleshoot the problem yourself by looking at the Comsat code and submit a PR. This seems like a very contained, local problem, that doesn't require deep understanding of Quasar or Comsat. Want to give it a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants