this is used many times (in the first example the content type is also set). Maybe we can create a method `create_404` and replace all 404 by it?