mattermost-plugin-github icon indicating copy to clipboard operation
mattermost-plugin-github copied to clipboard

Handle case where sidebar API endpoints return null

Open mickmister opened this issue 5 years ago • 3 comments

Summary

On the community server I experienced an issue where the reviews, yourprs, and yourassignments API endpoints are returning 200s, but return null for the response body. The unreads endpoint was returning valid data. Clicking one of the categories that returned null results in the webapp crashing.

I believe this was caused by a short outage on GitHub's part, as I was also experiencing issues while searching for PRs and issues on GitHub's interface today. Nevertheless, the plugin should be resilient to this and make sure the webapp does not crash in this case. The fixes be:

  • Backend should return a non-200 when something went wrong fetching from GitHub
  • If an error was not returned from GitHub, but something still went wrong, the backend should return an empty list instead of null

The frontend should also defend against the null pointer exception, and make sure the crash does not happen in this case.

Screenshots

mickmister avatar Apr 02 '20 21:04 mickmister

Hi, I would like to work on this issue, would that be ok @mickmister ?

fmo00 avatar Jul 23 '24 19:07 fmo00

Go for it, @fmo00!

lieut-data avatar Jul 23 '24 20:07 lieut-data

@fmo00 Let us know if you need any help from our side

Kshitij-Katiyar avatar Sep 24 '24 12:09 Kshitij-Katiyar