You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
500 error when trying to load a particular scratch that is found on the 2nd page of preset 6.
It appears as if the scratch belongs to a github user that no longer exists.
07:00:21 DEBUG Starting new HTTPS connection (1): api.github.com:443
07:00:21 DEBUG https://api.github.com:443 "GET /user/149795111 HTTP/1.1" 401 80
07:00:42 DEBUG Starting new HTTPS connection (1): api.github.com:443
07:00:42 DEBUG https://api.github.com:443 "GET /user/149795111 HTTP/1.1" 404 105
07:00:42 ERROR Internal Server Error: /api/scratch
Traceback (most recent call last):
File "/var/www/decomp.me/repo/backend/coreapp/models/github.py", line 63, in details
details = Github(self.access_token).get_user_by_id(self.github_id)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/github/MainClass.py", line 325, in get_user_by_id
headers, data = self.__requester.requestJsonAndCheck("GET", f"/user/{user_id}")
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/github/Requester.py", line 494, in requestJsonAndCheck
return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/github/Requester.py", line 525, in __check
raise self.createException(status, responseHeaders, data)
github.GithubException.BadCredentialsException: 401 {"message": "Bad credentials", "documentation_url": "https://docs.github.com/rest"}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/sentry_sdk/integrations/django/views.py", line 84, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
return view_func(request, *args, **kwargs)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/mixins.py", line 43, in list
return self.get_paginated_response(serializer.data)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/serializers.py", line 768, in data
ret = super().data
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/serializers.py", line 253, in data
self._data = self.to_representation(self.instance)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/serializers.py", line 686, in to_representation
return [
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/serializers.py", line 687, in <listcomp>
self.child.to_representation(item) for item in iterable
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/rest_framework/serializers.py", line 522, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/var/www/decomp.me/repo/backend/coreapp/serializers.py", line 79, in to_representation
return serialize_profile(self.context["request"], profile, small=True)
File "/var/www/decomp.me/repo/backend/coreapp/serializers.py", line 42, in serialize_profile
github_details = github.details() if github else None
File "/var/www/decomp.me/repo/backend/coreapp/models/github.py", line 80, in details
details = Github().get_user_by_id(self.github_id)
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/github/MainClass.py", line 325, in get_user_by_id
headers, data = self.__requester.requestJsonAndCheck("GET", f"/user/{user_id}")
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/github/Requester.py", line 494, in requestJsonAndCheck
return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
File "/home/ethteck/.cache/pypoetry/virtualenvs/backend-xRJ-wtRq-py3.10/lib/python3.10/site-packages/github/Requester.py", line 525, in __check
raise self.createException(status, responseHeaders, data)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/users/users#get-a-user"}
The text was updated successfully, but these errors were encountered:
mkst
changed the title
[BUG] Server Error (500) relating to github get_user_by_id
[BUG] Server Error (500) relating to github get_user_by_id (UnknownObjectException)
Feb 2, 2024
Describe the bug
500 error when trying to load a particular scratch that is found on the 2nd page of preset 6.
It appears as if the scratch belongs to a github user that no longer exists.
To Reproduce
Expected behavior
Page should load correctly.
The text was updated successfully, but these errors were encountered: