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

Raise error for incomplete response without new server state #54

Closed
CrowdHailer opened this issue Oct 24, 2017 · 0 comments
Closed

Raise error for incomplete response without new server state #54

CrowdHailer opened this issue Oct 24, 2017 · 0 comments

Comments

@CrowdHailer
Copy link
Owner

CrowdHailer commented Oct 24, 2017

If any callback returns a response with body set to true an error should be raised. This is because the response is incomplete.

e.g.

defmodule MyServer do
use Raxx.Server

def handle_request(request, state) do
  response = Raxx.response(:ok)
  |> Raxx.set_body(true)
end
end

This example should raise an error
the correct return value is {response, new_state}

chx added a commit to chx/raxx that referenced this issue Oct 25, 2017
CrowdHailer added a commit that referenced this issue Oct 25, 2017
#54 Raise error for incomplete response without new server state
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

1 participant