[BugSnag] PLAT-14898: Added the ability to add comments to BugSnag errors#338
Draft
jasonMcCullough wants to merge 1 commit intomainfrom
Draft
[BugSnag] PLAT-14898: Added the ability to add comments to BugSnag errors#338jasonMcCullough wants to merge 1 commit intomainfrom
jasonMcCullough wants to merge 1 commit intomainfrom
Conversation
…rors (#334) * feat: added ability to add comments to bugsnag errors * chore: auth token usage cleanup, uses it as an Authorization header value instead of my original idea of using it as a query parameter * chore: formatting improvements via npm run format command * basic test coverage for commenting on a bugsnag * chore: format fixes in test file
Contributor
🎯 Coverage Target Met!📈 Coverage Metrics
📊 Test Statistics
🔍 Files Needing Coverage
📝 Report generated on Node.js v24.12.0 • View workflow • Coverage by Vitest + v8 |
Contributor
Author
|
This was originally on a fork, I've since merged the content from my fork branch pull request to here to make finding it a bit easier. |
sazap10
reviewed
Feb 19, 2026
Comment on lines
+224
to
+238
| const url = new URL( | ||
| `/projects/${projectId}/errors/${errorId}/comments`, | ||
| this.configuration.basePath, | ||
| ); | ||
|
|
||
| const options = { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| "X-Bugsnag-Api": "true", | ||
| Authorization: this.configuration.apiKey, | ||
| }, | ||
| body: JSON.stringify({ message }), | ||
| }; | ||
|
|
Contributor
There was a problem hiding this comment.
we generate the API code from the openAPI spec which should generate the creator for this request.
is how we do that. We should use something like that for this endpoint
Contributor
Author
There was a problem hiding this comment.
Thanks Sachin, the way I did this is a bit rough and ready I have to admit. I'll see if I have enough time to give this a good polish
Contributor
Author
There was a problem hiding this comment.
I'll not have time to finish this unfortunately Sachin but hopefully somebody can have a blast at this after I leave SmartBear 🙏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Adds the ability for comments to be added to errors in BugSnag.
Design
This coincides with how comments are normally created via the dashboard. Only with this, we're exposing it for being called via MCP instead.
Changeset
/commentsendpoint and manages the necessary query parameter and header logic.createCommentOnErrorInputSchemacontains the Zod logic for defining how interactions should be structured when making calls to the/commentsendpoint.Testing