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: handle non Error objects being passed to captureException #1806

Merged
merged 7 commits into from
Mar 10, 2025

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Mar 10, 2025

Changes

We do not handle value being an object, so let's make sure it's a string

daibhin added 5 commits March 6, 2025 17:26

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was signed with the committer’s verified signature.
ijjk JJ Kasper
Copy link

vercel bot commented Mar 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Mar 10, 2025 1:39pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added host parameter to PostHog CLI commands and improved error handling for plain objects in exception capture.

  • Added --host=http://localhost:8010 parameter to sourcemap inject/upload commands in /playground/error-tracking/react-ts-esbuild/package.json
  • Enhanced error handling in src/posthog-core.ts to properly handle plain objects with message properties as error values
  • Ensures more consistent error reporting by capturing message properties from object-type errors

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@daibhin daibhin changed the title set host fix: handle non Error objects being passed to captureException Mar 10, 2025
@daibhin daibhin added the bump patch Bump patch version when this PR gets merged label Mar 10, 2025
Copy link

github-actions bot commented Mar 10, 2025

Size Change: +465 B (+0.01%)

Total Size: 3.57 MB

Filename Size Change
dist/array.full.es5.js 274 kB +47 B (+0.02%)
dist/array.full.js 377 kB +47 B (+0.01%)
dist/array.full.no-external.js 376 kB +47 B (+0.01%)
dist/array.js 185 kB +46 B (+0.02%)
dist/array.no-external.js 184 kB +46 B (+0.03%)
dist/main.js 186 kB +46 B (+0.02%)
dist/module.full.js 377 kB +47 B (+0.01%)
dist/module.full.no-external.js 376 kB +47 B (+0.01%)
dist/module.js 185 kB +46 B (+0.02%)
dist/module.no-external.js 184 kB +46 B (+0.02%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 220 kB
dist/customizations.full.js 14 kB
dist/dead-clicks-autocapture.js 14.5 kB
dist/exception-autocapture.js 9.94 kB
dist/external-scripts-loader.js 2.64 kB
dist/posthog-recorder.js 212 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 71.3 kB
dist/surveys.js 76 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@daibhin daibhin merged commit fa31f41 into main Mar 10, 2025
25 checks passed
@daibhin daibhin deleted the err/dn-fix/plain-object branch March 10, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants