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

(2.1) Handles captureFeedback errors #4364

Merged
merged 115 commits into from
Jan 15, 2025

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Dec 12, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4328

📜 Description

  • Handles captureFeedback errors
  • Aligns with the JS callbacks API by adding the onFormOpen, onSubmitSuccess, onSubmitError, onFormSubmitted

💡 Motivation and Context

Fixes #4359

💚 How did you test it?

Manual testing, Unit tests

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

Base automatically changed from antonis/3859-newCaptureFeedbackAPI-Form to feedback-ui January 10, 2025 10:32
Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

The transport in mobile SDK works differently than the JS transport, and we currently don't have the response available, so the sendFeedback will still throw event after the fix in JS.

See impl of sendEnvelope in RN

return Promise.resolve({});


I think we should avoid checking the connection before send, because the native transport handles that (it stores the envelope offline and tries to send it later).


We can just try catch our current captureFeedback api for the on error call back. And note in the docs that if the device is offline the envelope is sent later.

@antonis antonis changed the title (2.1) Handles Capture feedback form network connection issues (2.1) Handles captureFeedback errors Jan 10, 2025
@antonis
Copy link
Collaborator Author

antonis commented Jan 10, 2025

Thank you for the feedback @krystofwoldrich and the explanation on why not to use sendFeedback 🙇

We can just try catch our current captureFeedback api for the on error call back. And note in the docs that if the device is offline the envelope is sent later.

Makes sense 👍 Updated with c014ccc

Copy link
Collaborator

@lucas-zimerman lucas-zimerman left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you for the PR!

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Thank you for all the changes and refs.

Looks good! 🚀

@krystofwoldrich krystofwoldrich merged commit 4529b68 into feedback-ui Jan 15, 2025
66 checks passed
@krystofwoldrich krystofwoldrich deleted the antonis/4359-Feedback-Form-NetworkError branch January 15, 2025 17:44
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.

Handle feedback form submision errors
3 participants