correct internal server error from policy api endpoint