Commit df1cf85
authored
Fix: Re-throw default pattern creation errors instead of swallowing (commontoolsinc#2071)
**Problem:**
Errors in DefaultPattern.create() were caught and logged but not re-thrown,
causing silent failures.
**Why this breaks mentions:**
1. linkDefaultPattern() fails (network glitch, race condition, etc.)
2. Error is swallowed → no indication to user
3. DefaultCharmList charm created successfully
4. But /defaultPattern link in space cell is missing
5. wish("#mentionable") resolves path: /defaultPattern/backlinksIndex/mentionable
6. Path resolution fails because /defaultPattern doesn't exist
7. Returns empty array instead of charm list
8. ct-code-editor receives empty mentionable list
9. [[ dropdown shows no completions
**Symptom:**
Type [[ in notes field → dropdown is empty (even though backlinksIndex has data)
**Timeline:**
- Oct 23 (947b471): linkDefaultPattern added
- Nov 6 (or earlier): Spaces created with transient link failures
- Today: Error swallowing discovered
**Fix:**
Re-throw errors to surface failures immediately. Future spaces will fail loudly
if linking doesn't work, preventing silent corruption.
**Workaround for affected spaces:**
Delete packages/toolshed/cache/memory/*.sqlite and recreate spaces.1 parent 2497e88 commit df1cf85
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
0 commit comments