add proper http status to 404 and 410 responses