handle 404 in api pipeline