mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-25 17:15:04 +02:00
- Replaced instances of silentDebug with happy_path_error__with_fallback across multiple files to improve error logging and handling. - Updated the utility function to provide clearer semantics for error handling when expected values are missing. - Introduced a script to find potential silent failures in the codebase that may need to be addressed with the new error handling approach.
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Find Silent Failure Patterns
|
|
#
|
|
# This script searches for defensive OR patterns (|| '' || null || undefined)
|
|
# that should potentially use happy_path_error__with_fallback instead.
|
|
#
|
|
# Usage: ./scripts/find-silent-failures.sh
|
|
|
|
echo "=================================================="
|
|
echo "Searching for defensive OR patterns in src/"
|
|
echo "These MAY be silent failures that should log errors"
|
|
echo "=================================================="
|
|
echo ""
|
|
|
|
echo "🔍 Searching for: || ''"
|
|
echo "---"
|
|
grep -rn "|| ''" src/ --include="*.ts" --color=always || echo " (none found)"
|
|
echo ""
|
|
|
|
echo "🔍 Searching for: || \"\""
|
|
echo "---"
|
|
grep -rn '|| ""' src/ --include="*.ts" --color=always || echo " (none found)"
|
|
echo ""
|
|
|
|
echo "🔍 Searching for: || null"
|
|
echo "---"
|
|
grep -rn "|| null" src/ --include="*.ts" --color=always || echo " (none found)"
|
|
echo ""
|
|
|
|
echo "🔍 Searching for: || undefined"
|
|
echo "---"
|
|
grep -rn "|| undefined" src/ --include="*.ts" --color=always || echo " (none found)"
|
|
echo ""
|
|
|
|
echo "=================================================="
|
|
echo "Review each match and determine if it should use:"
|
|
echo " happy_path_error__with_fallback('description', data, fallback)"
|
|
echo "=================================================="
|