Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasm httplib replacement2 #3

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

carlopi
Copy link
Contributor

@carlopi carlopi commented Dec 13, 2024

This improves the codepath for problematic cases where JavaScript request would fail / throw.

There is a change outside of Wasm: using HTTPException instead of std::runtime_error.
They should behave about the same (since HTTPException is a std::runtime_error), but be rendered somehow better.

Error message in case of CORS errors is now:

SELECT load_macro_from_url('https://gist.github.com/lmangani/518215a68e674ac662537d518799b893/raw/5f305480fdd7468f4ecda3686011bab8e8e711bf/bsky.sql') as res;
HTTP Error: 400: Unknown error, something went quack in Wasm land! Please consult the console and or the docs at https://duckdb.org/community_extensions/extensions/webmacro

@lmangani lmangani merged commit 3f980d8 into quackscience:main Dec 13, 2024
22 checks passed
@carlopi carlopi deleted the wasm_httplib_replacement2 branch December 13, 2024 15:15
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.

2 participants