Skip to content

Commit e55396c

Browse files
committed
fix: errors on bookmark are now surfaced in the Python console
1 parent a380aff commit e55396c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

shiny/bookmark/_bookmark.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -558,15 +558,10 @@ async def do_bookmark(self) -> None:
558558
await self.show_bookmark_url_modal(full_url)
559559

560560
except Exception as e:
561-
msg = f"Error bookmarking state: {e}"
562-
from ..ui._notification import notification_show
563-
564-
notification_show(
565-
msg,
566-
duration=None,
567-
type="error",
568-
session=self._root_session,
569-
)
561+
from ..types import NotifyException
562+
563+
msg = f"Error bookmarking state: {str(e)}"
564+
raise NotifyException(msg) from e
570565

571566

572567
class BookmarkProxy(Bookmark):

shiny/reactive/_reactives.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,10 @@ async def _run(self) -> None:
597597
from ..ui import notification_show
598598

599599
msg = str(e)
600+
warnings.warn(msg, ReactiveWarning, stacklevel=2)
600601
if e.sanitize:
601602
msg = SANITIZE_ERROR_MSG
602-
notification_show(msg, type="error", duration=5000)
603+
notification_show(msg, type="error", duration=None)
603604
if e.close:
604605
await self._session._unhandled_error(e)
605606
except Exception as e:

0 commit comments

Comments
 (0)