novaframework / nova

Web framework for Erlang.
http://www.novaframework.org
Apache License 2.0
230 stars 21 forks source link

[BUG] Referencing to a non-existent template should result in a 404 #203

Closed burbas closed 1 year ago

burbas commented 1 year ago

Describe the bug If we define a controller that returns the following:

{ok, [], #{view => no_existing_template}}.

Nova will crash with an exception thrown that the template can't be found.

Expected behavior A generated 404 page should be returned

Taure commented 1 year ago

Could we add that it throws a warning or something?

So we an say like you are trying to point to a view that we couldn't find?

burbas commented 1 year ago

Could we add that it throws a warning or something?

So we an say like you are trying to point to a view that we couldn't find?

We're already doing that but we need to send a rendered page back to the user. Think we might need to check the logic around rendering and validation in the whole pipeline.