rwsdk 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,10 +23,13 @@ export const renderRscThenableToHtmlStream = async ({ thenable, Document, reques
23
23
  nonce: requestInfo.rw.nonce,
24
24
  onError(error, { componentStack }) {
25
25
  try {
26
+ if (!error) {
27
+ error = new Error(`A falsy value was thrown during rendering: ${String(error)}.`);
28
+ }
26
29
  const message = error
27
30
  ? (error.stack ?? error.message ?? error)
28
31
  : error;
29
- const wrappedMessage = `Error rendering RSC to HTML stream: ${message}\n\nComponent stack:\n${componentStack}`;
32
+ const wrappedMessage = `${message}\n\nComponent stack:${componentStack}`;
30
33
  if (error instanceof Error) {
31
34
  const wrappedError = new Error(wrappedMessage);
32
35
  wrappedError.stack = error.stack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rwsdk",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime",
5
5
  "type": "module",
6
6
  "bin": {