def _get_sap_config()

in backend-printing/helper/backend_print.py [0:0]


    def _get_sap_config(self, sap_sid, sap_environment):
        """Get the SAP config from the key vault

        Args:
            sap_sid (string): SAP system ID
            sap_environment (string): SAP environment

        Returns:
            dict: SAP config
        """
        try:
            secret = KeyVault().get_sap_config(
                secret_name=SAP_CONFIG_KEY_VAULT_KEY
                % (
                    sap_environment,
                    sap_sid,
                ),
            )
            return self._load_schema(json.loads(secret.value))
        except Exception as e:
            raise Exception(f"Error occurred getting SAP config: {e}")