Better error messages for wasm network errors#145
Merged
ianthomas23 merged 1 commit intomainfrom Apr 22, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 88.27% 88.22% -0.06%
==========================================
Files 61 61
Lines 2730 3065 +335
Branches 330 330
==========================================
+ Hits 2410 2704 +294
- Misses 320 361 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
WebAssembly tests passing: https://github.com/QuantStack/git2cpp/actions/runs/24778479938 Codecov fails as we don't have a way of measuring code coverage in the wasm build. |
JohanMabille
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR uses better error messages for wasm network errors. These error messages occur on the JavaScript side and are passed back to the C++ for display on
stderr. Unfortunately some of the error messages are not very informative for end users, such as if there isn't a CORS proxy:This error is now displayed as:
Unfortunately we cannot be more specific as the real reason for a failed
XMLHttpRequest.sendis browser-specific and is not available via a standard browser JavaScript API. Some browsers report something useful in the browser console, others don't, and usually there is something useful but necessarily technical in the browser dev tools network tab.Longer term we can probably do better than this, but for now it is at least an improvement on the current behaviour.
I have tested this manually on chrome, firefox and safari.
Closes #130.