hypothesis / hypothesis/lms

Handle: "Requested ResourceLink bound to unexpected external tool" while fetching assignment rosters

Open
#6,653 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
53
Forks
16
Avg merge
14d 5h
Merged PRs (30d)
14

Description

Sentry Issue: [LMS-176](https://hypothesis.sentry.io/issues/5795497998/?referrer=github_integration)

```
HTTPError: 401 Client Error: Unauthorized for url: https://hypothesis.instructure.com/api/lti/courses/319/names_and_roles?rlid=375f6d0c-2e49-49e5-a0d9-307f947b67aa
File "lms/services/http.py", line 38, in request
response.raise_for_status()

ExternalRequestError: ExternalRequestError(message=None, request=Request(method='GET', url='https://hypothesis.instructure.com/api/lti/courses/319/names_and_roles?rlid=375f6d0c-2e49-49e5-a0d9-307f947b67aa', body=None), response=Response(status_code=401, reason='Unauthorized', body='{"errors":{"type":"unauthorized","message":"Invalid access token format"}}'), validation_errors=None)
(4 additional frame(s) were not displayed)
...
File "lms/tasks/roster.py", line 151, in fetch_assignment_roster
roster_service.fetch_assignment_roster(assignment)
File "lms/services/roster.py", line 114, in fetch_assignment_roster
roster = self._lti_names_roles_service.get_context_memberships(
File "lms/services/lti_names_roles.py", line 53, in get_context_memberships
response = self._ltia_service.request(
File "lms/services/ltia_http.py", line 46, in request
return self._http.request(method, url, headers=headers, **kwargs)
File "lms/services/http.py", line 40, in request
raise ExternalRequestError(request=err.request, response=response) from err
```

See: https://hypothes-is.slack.com/archives/C1MA4E9B9/p1725372178973579

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.