add error html and handle detail for 404