Add 404 handling to markdown type