Render a 404 from a resource controller when a resource is not found

Hi,

I’m new to Elixir and Phoenix and I came across a scenario where I’d like to render the 404 error page from a resource controller when a resource is not found.

Is raising a custom error setting the status code 404 the recommended pattern? Should I render through the ErrorHTML module that gets created with the Phoenix project?

Thanks in advance