Handle case where sidebar API endpoints return null
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
Hi, I would like to work on this issue, would that be ok @mickmister ?
Go for it, @fmo00!
@fmo00 Let us know if you need any help from our side