#11: handle 404 and 500