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

Fix on_mount LiveView hook when given :not_mounted_at_router #742

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

savhappy
Copy link
Collaborator

@savhappy savhappy commented Jun 27, 2024

Closes #738.

  • Added new on_mount for params atom :not_mounted_at_router and bypasses logging error when a liveview process is a child of a non-live controller/view
  • added test - checks to ensure logger has no errors in metadata

Copy link
Collaborator

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Just left one comment but looks great.

Comment on lines 46 to 48
defmodule SentryTest.ErrorView do
def render(template, _), do: Phoenix.Controller.status_message_from_template(template)
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this considering you're just returning some text with text/2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! Removed!

@whatyouhide whatyouhide changed the title add new on-mount and test Fix on_mount LiveView hook when given :not_mounted_at_router Jun 27, 2024
@whatyouhide whatyouhide changed the title Fix on_mount LiveView hook when given :not_mounted_at_router Fix on_mount LiveView hook when given :not_mounted_at_router Jun 27, 2024
@savhappy savhappy force-pushed the sav/#738-liveviewhook branch from e53d982 to bce503b Compare June 27, 2024 15:51
@savhappy savhappy requested a review from whatyouhide June 27, 2024 16:23
@whatyouhide whatyouhide merged commit 185b929 into getsentry:master Jun 27, 2024
2 of 3 checks passed
@savhappy savhappy deleted the sav/#738-liveviewhook branch June 27, 2024 16:41
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.

Error using on_mount Sentry.LiveViewHook for child LiveView
2 participants