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

Raise more specific error when wrapper not found #321

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

unoduetre
Copy link
Contributor

@unoduetre unoduetre commented Mar 21, 2024

What

When wrapper is not found it results in a method being called on nil, which produces NoMethodError. For the purposes of investigating the error in the attached Trello card it would be useful to produce a more meaningful error containing some additional information which could help the investigation.

(Have added a feature flag, so this is only active when SLIMMER_WRAPPER_CHECK=true is set in the host app)

Why

To facilitate the investigation of the error in the Trello card

@unoduetre unoduetre force-pushed the 2495-sentry-errors-investigate-frontend-nomethoderror branch 2 times, most recently from 9c5bd77 to 5e86edb Compare March 21, 2024 10:54
@unoduetre
Copy link
Contributor Author

Closing this for now as another approach would be taken first.

@unoduetre unoduetre closed this Mar 21, 2024
@KludgeKML KludgeKML reopened this May 29, 2024
@KludgeKML KludgeKML force-pushed the 2495-sentry-errors-investigate-frontend-nomethoderror branch 3 times, most recently from 6df2e5a to f7a8be2 Compare May 30, 2024 09:23
@KludgeKML KludgeKML force-pushed the 2495-sentry-errors-investigate-frontend-nomethoderror branch from f7a8be2 to 5b35b16 Compare May 30, 2024 09:27
@@ -26,5 +26,9 @@ def filter(src, dest)
def is_gem_layout?
@headers[Slimmer::Headers::TEMPLATE_HEADER]&.start_with?("gem_layout")
end

def wrapper_check?
ENV["SLIMMER_WRAPPER_CHECK"] == "true"

Choose a reason for hiding this comment

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

So it will be "off" by default, that's nice.

@unoduetre unoduetre merged commit a823d1a into main Jun 10, 2024
15 checks passed
@unoduetre unoduetre deleted the 2495-sentry-errors-investigate-frontend-nomethoderror branch June 10, 2024 09:24
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.

3 participants