Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

fix: dont throw if profiler returns nulptr#197

Merged
JonasBa merged 1 commit intomainfrom
jb/fix/sentry-profile-stop
Sep 5, 2023
Merged

fix: dont throw if profiler returns nulptr#197
JonasBa merged 1 commit intomainfrom
jb/fix/sentry-profile-stop

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Sep 5, 2023

Removing the throw call added in https://github.com/getsentry/profiling-node/pull/187/files#r1316130323 and unblocks #196

I did not manage to find a root cause quickly so I am removing the throw call in order to unblock users (it was added recently). I've looked through the timeout logic and did not find any issues (I have added some more tests). Since nulptr is a valid return from the profiler we should just handle it gracefully anyways

// if that title had somehow been stopped already, profile will be null.
status = ProfileStatus::kStopped;

if (!profile) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤦🏼

@JonasBa JonasBa force-pushed the jb/fix/sentry-profile-stop branch 2 times, most recently from abf4899 to 8b105d8 Compare September 5, 2023 16:44
@JonasBa JonasBa merged commit 5a0d28e into main Sep 5, 2023
@JonasBa JonasBa deleted the jb/fix/sentry-profile-stop branch September 5, 2023 17:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant