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
Maybe a sporadic error; when I tried the hathi bib record API url that had an error, it worked for me. Or possibly Hathi throttles those APIs as well, if someone hits them too much? This is possibly not a real-world error, the error email indicated a large number of strange cookies and several unAPI URLs were hit in succession, so likely this was triggered by something crawling the site.
Not sure the best way to handle; maybe catch the HathiItemNotFound and return a brief error message with a 503 Service Unavailable code?
Stack trace from the error email:
HathiItemNotFound at /unapi/
No exception message supplied
Traceback:
File "/var/www/prosody/env/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/var/www/prosody/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/var/www/prosody/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/prosody/env/lib/python3.6/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/var/www/prosody/env/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
88. return handler(request, *args, **kwargs)
File "/var/www/prosody/ppa/unapi/views.py" in get
42. content=self.get_metadata(item_id, metadata_format),
File "/var/www/prosody/ppa/unapi/views.py" in get_metadata
65. return item.get_metadata(data_format)
File "/var/www/prosody/ppa/archive/models.py" in get_metadata
588. bibdata = bib_api.record('htid', self.source_id)
File "/var/www/prosody/ppa/archive/hathi.py" in record
81. return self._get_record('full', id_type, id_value)
File "/var/www/prosody/ppa/archive/hathi.py" in _get_record
64. raise HathiItemNotFound
Exception Type: HathiItemNotFound at /unapi/
Request information:
USER: AnonymousUser
GET:
id = 'hvd.hwssft'
format = 'marc'
POST: No POST data
FILES: No FILES data
The text was updated successfully, but these errors were encountered:
Maybe a sporadic error; when I tried the hathi bib record API url that had an error, it worked for me. Or possibly Hathi throttles those APIs as well, if someone hits them too much? This is possibly not a real-world error, the error email indicated a large number of strange cookies and several unAPI URLs were hit in succession, so likely this was triggered by something crawling the site.
Not sure the best way to handle; maybe catch the
HathiItemNotFound
and return a brief error message with a 503 Service Unavailable code?Stack trace from the error email:
The text was updated successfully, but these errors were encountered: