Skip to content

Commit

Permalink
fix: warn when on xhr error used
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Jul 11, 2024
1 parent 9261c19 commit 1941f39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/posthog-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ export class PostHog {
})
)

if (this.config.on_xhr_error) {
logger.error('[posthog] on_xhr_error is deprecated. Use on_request_error instead')
}

this.compression = config.disable_compression ? undefined : Compression.Base64

this.persistence = new PostHogPersistence(this.config)
Expand Down

0 comments on commit 1941f39

Please sign in to comment.