mattermost / mattermost/mattermost-plugin-github
Investigate proper parsing of API errors on webapp side
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 179
- Forks
- 180
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
The plugin's backend is returning error messages as JSON, making it so the frontend displays the errors as JSON in some cases. These code paths should be reviewed to make sure it is rendered properly when we display the errors in different components.
The frontend should be resilient to the possibility that the error is not structured as JSON as well.
---
Original comment:
This PR is a quick resolution for this issue, however, I believe that it will still need to be further examined and the changes from stringified error to parseable object error should happen in the function that receives the error, not in the method that renders it. Therefore, I believe that still needs to change for this issue to be complete, either in this PR, or if further consistency between error objects across the webapp and the server need to be examined then possibly in the scope of another issue.
_Originally posted by @aidapira in https://github.com/mattermost/mattermost-plugin-github/pull/333#issuecomment-665173408_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the webapp error-receiving and error-rendering paths across the affected components; the issue does not name specific files or tests. Done means structured errors render as user-facing messages consistently and unstructured errors are handled without displaying raw JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100