Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(2.1) Handles captureFeedback errors #4364

Open
wants to merge 113 commits into
base: feedback-ui
Choose a base branch
from

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

@lucas-zimerman
Copy link
Collaborator

I plan to iterate with the alternative approach sinc

So this PR is blocked by #4383 ?

@antonis
Copy link
Collaborator Author

antonis commented Dec 18, 2024

I plan to iterate with the alternative approach sinc

So this PR is blocked by #4383 ?

I think we can start with the current approach and then iterate with an improvement with #4383

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

# for free to join this conversation on GitHub. Already have an account? # 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