4xx errors from JSTOR API on assignment launch result in incorrect `mode` config in the frontend
- Dominant language
- Python
- Stars
- 53
- Forks
- 16
- Avg merge
- 14d 5h
- Merged PRs (30d)
- 14
Description
The JSTOR assignment at https://hypothesis.instructure.com/courses/125/assignments/2852 is currently failing to load due to an authorization error when we fetch the PDF from their API. See https://hypothesis.sentry.io/issues/4464064387.
What should happen in this situation is that some kind of error is presented to the user. Instead the view navigates to `https://lms.hypothes.is/app/null` and a "Page not found" message is being shown. This URL and message is being shown because the backend is setting an invalid value for `mode` in the frontend configuration:
```json
{
"api": {
"authToken": "Bearer ..."
},
"canvas": {
},
"debug": {
"tags": [
"role:instructor"
],
"values": {
}
},
"dev": false,
"mode": null
}
```
Instead the configuration should be something that causes the frontend to render an error dialog.
Slack thread: https://hypothes-is.slack.com/archives/C02T75RKBTK/p1721106307351849?thread_ts=1721067738.484689&cid=C02T75RKBTK
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.