import os
import glob

directory = r"C:\canifa-idea\chatbot-canifa-feedback\miniapp\cuccu_note\frontend\tests\e2e"
files = glob.glob(os.path.join(directory, "*.ts"))

for file in files:
    with open(file, 'r', encoding='utf-8') as f:
        content = f.read()
    
    if "catch {" in content:
        content = content.replace("catch {", "catch (e) {")
        with open(file, 'w', encoding='utf-8') as f:
            f.write(content)
        print(f"Fixed {file}")
