Skip to content

fix: no error when db not exist in useSQL#65

Open
xmok wants to merge 1 commit intoraycast:mainfrom
xmok:patch-1
Open

fix: no error when db not exist in useSQL#65
xmok wants to merge 1 commit intoraycast:mainfrom
xmok:patch-1

Conversation

@xmok
Copy link
Copy Markdown

@xmok xmok commented Dec 25, 2025

Currently, ⁠useSQL performs an ⁠existsSync check synchronously inside ⁠useMemo. If the file is missing, this throws an error during the React render phase, causing the entire component to crash (noticed this because of raycast/extensions#23965) which means no onError 🥲.

Since ⁠baseExecuteSQL already checks for file existence, we can safely remove the lines and cause the error to be handled.

There is no test case in the tests folder but if needed, I can create one.

carlesandres added a commit to carlesandres/models-dev that referenced this pull request Mar 30, 2026
…st launch

useCachedPromise uses ~4x more memory than direct fetch when populating
an empty cache, causing JS heap out of memory crashes on first launch.

This replaces it with direct fetch + Cache API while maintaining the
same stale-while-revalidate behavior.

See: raycast/utils#65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant