Updating the error api and uri generation