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

Should rendering non-existent route raise error? #96

Open
edisonywh opened this issue May 9, 2021 · 3 comments
Open

Should rendering non-existent route raise error? #96

edisonywh opened this issue May 9, 2021 · 3 comments

Comments

@edisonywh
Copy link

Is your feature request related to a problem? Please describe.
I find that if I have a controller action like this:

  def does_not_exist(conn, _) do
    render_inertia(conn, "DoesNotExist", props: %{hello: "world"})
  end

Describe the solution you'd like
My Phoenix app renders with a 200 without error, whereas I would prefer to raise error if the template wasn't found, what do you think?

@tmartin8080
Copy link
Collaborator

Sorry about the delay. Sounds like it might be helpful to add a config option for this: raise_on_not_found: true / false. Are you able to pull together a PR?

@edisonywh
Copy link
Author

No worries! I don't think I'm able to sorry, I've moved off Inertia to use LiveView instead (no fault of the library! Just wanted to use LiveView more :))

@tmartin8080
Copy link
Collaborator

Me too! Good luck with everything.

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

No branches or pull requests

2 participants