Saving Bug Reports

saveReport

Deprecation notice: this method will be removed in the coming weeks.

You can use the saveReport method to generate a bug report and save it programmatically. The bug report will include the usual information, such as screen recording, console, and user info.

You could call this method when the user clicks a button or a link to submit a bug report or build your own custom integratinos to generate reports automatically when a specific error has happened during critical flows.

Example

window.Bugpilot.saveReport({
  source: "string", // Optional
  userProvidedDescription: "string", // Optional
});

The method takes an optional parameter with the following properties:

Key
Description
Required

source

A string that describe how or why this report has been generated. For example, "widget", "feedback-widget", or "home-page-widget".

This string will be shown on the Bug report page.

Optional

userProvidedDescription

A description of the problem, for example, a description provided by the user after a bug has happened. This string will be the description of the bug and will be shown on the report page and sent to the configured integrations.

Optional

Reports can take a few seconds to be saved and uploaded to Bugpilot. Calling saveReport during unload or onbeforeunload will not work.

Last updated