handle error if required legislatura not has a database