schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs and SSR.
https://jasprpad.schultek.de
MIT License
996 stars 59 forks source link

fix: Forward errors to main isolate in renderHtml #198

Closed fuzzybinary closed 3 months ago

fuzzybinary commented 3 months ago

Description

Errors when calling renderHtml were silently failing and resulting in timeouts because the exception wasn't automatically passed to the spawning isolate. Add an separate errorPort to support sending the error to the calling isolate which will properly throw it back the the handler.

This probably also needs to be done for renderData.

Partially fixes #129

Type of Change

🛠️ Bug fix

Ready Checklist

github-actions[bot] commented 3 months ago

Package Version Report

The following packages have been updated: jaspr : 0.10.0 -> 0.11.0 jaspr_builder : 0.10.0 -> 0.11.0 jaspr_cli : 0.10.0 -> 0.11.0 jaspr_flutter_embed : 0.2.0 -> 0.3.0 jaspr_riverpod : 0.3.9 -> 0.3.10 jaspr_router : 0.3.1 -> 0.3.2 jaspr_test : 0.10.0 -> 0.11.0

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 59.95%. Comparing base (6ab1cdb) to head (33ba724). Report is 1 commits behind head on main.

Files Patch % Lines
...ackages/jaspr/lib/src/server/render_functions.dart 81.81% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #198 +/- ## ======================================= Coverage 59.94% 59.95% ======================================= Files 101 101 Lines 4219 4225 +6 ======================================= + Hits 2529 2533 +4 - Misses 1690 1692 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

schultek commented 3 months ago

Thanks for your contribution. I've merged this and will add the same for the renderData method.