in services/ui_backend_service/api/utils.py [0:0]
def get_json_from_file(filepath: str):
try:
with open(filepath) as f:
return json.load(f)
except FileNotFoundError:
# not an issue, as users might not want to configure certain components.
return None
except Exception as ex:
logger.warning(
f"Error parsing JSON from file: {filepath}\n Error: {str(ex)}"
)
return None