Skip to content

fix: capture query errors explicitely#100

Merged
joshsny merged 1 commit intomainfrom
wizard-query-errors
Jul 15, 2025
Merged

fix: capture query errors explicitely#100
joshsny merged 1 commit intomainfrom
wizard-query-errors

Conversation

@joshsny
Copy link
Copy Markdown
Collaborator

@joshsny joshsny commented Jul 15, 2025

We get errors sometimes from the query endpoint, this manually adds a captureException call to make sure we get context on when that happens

@joshsny joshsny requested review from Copilot and jonathanlab and removed request for Copilot July 15, 2025 09:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds explicit error reporting for failed queries by capturing Axios errors with analytics before rethrowing.

  • Imported analytics and AxiosError.
  • Wrapped the axios.post call in a .catch to log context on errors.
  • Preserves original error behavior by rethrowing after capture.
Comments suppressed due to low confidence (1)

src/utils/query.ts:40

  • The new error capture path is not covered by existing tests. Please add unit or integration tests to verify that analytics.captureException is called with the correct context when the request fails.
        analytics.captureException(error, {

Comment thread src/utils/query.ts
Copy link
Copy Markdown
Collaborator

@jonathanlab jonathanlab left a comment

Choose a reason for hiding this comment

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

nice :)

@joshsny joshsny merged commit e0e860a into main Jul 15, 2025
10 checks passed
daniloc pushed a commit that referenced this pull request Oct 27, 2025
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