Collecting user feedback
We don’t want our users to be interrupted by errors, but sometimes it does happen. Honeybadger helps you work with your users to fix errors by allowing them to leave feedback when an error occurs.
Displaying a feedback form
Section titled “Displaying a feedback form”A form to collect user feedback can be displayed as a modal dialog.
Honeybadger will link this feedback with the last error reported, hence it is required that an error needs to be reported first before displaying it.
// we have to wait for the error to be reported and then call `showUserFeedbackForm()`Honeybadger.notify(error, { afterNotify: () => { Honeybadger.showUserFeedbackForm(); },});Additionally, you may choose to always the feedback form for every error that
occurs by setting a global afterNotify handler:
Honeybadger.afterNotify((err, notice) => { Honeybadger.showUserFeedbackForm();});Form customization
Section titled “Form customization”You can customize all the messages and labels of the form simply by setting an
options object when calling Honeybadger.showUserFeedbackForm(). The following
customization is available (the defaults are shown):
Honeybadger.showUserFeedbackForm({ messages: { heading: "Care to help us fix this?", explanation: "Any information you can provide will help our technical team get to the bottom of this issue.", thanks: "Thanks for the feedback!", }, buttons: { submit: "Send", cancel: "Cancel", }, labels: { name: "Name", email: "Your email address", comment: "Comment (required)", },});Viewing user feedback
Section titled “Viewing user feedback”You can find feedback from your users under the Comments tab of a Honeybadger error.