Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4 Search API serializer errors #4029

Open
sentry-io bot opened this issue May 7, 2024 · 1 comment
Open

V4 Search API serializer errors #4029

sentry-io bot opened this issue May 7, 2024 · 1 comment

Comments

@sentry-io
Copy link

sentry-io bot commented May 7, 2024

This is an error I got while testing in production over the new V4 Search API.

This one is related to the 'cites' field. It seems that in some documents it can get properly serialized.

Sentry Issue: COURTLISTENER-76S

KeyError: 'cites'
  File "elasticsearch_dsl/utils.py", line 151, in __getattr__
    return self.__getitem__(attr_name)
  File "elasticsearch_dsl/utils.py", line 166, in __getitem__
    return _wrap(self._d_[key])

AttributeError: 'DocketDocument' object has no attribute 'cites'
  File "rest_framework/fields.py", line 447, in get_attribute
    return get_attribute(instance, self.source_attrs)
  File "rest_framework/fields.py", line 97, in get_attribute
    instance = getattr(instance, attr)
  File "elasticsearch_dsl/utils.py", line 472, in __getattr__
    return super().__getattr__(name)
  File "elasticsearch_dsl/utils.py", line 153, in __getattr__
    raise AttributeError(

AttributeError: Got AttributeError when attempting to get a value for field `cites` on serializer `BaseRECAPDocumentESResultSerializer`.
The serializer field might be named incorrectly and not match any attribute or key on the `DocketDocument` instance.
Original exception text was: 'DocketDocument' object has no attribute 'cites'.
(9 additional frame(s) were not displayed)
...
  File "cl/search/api_views.py", line 275, in list
    return paginator.get_paginated_response(serializer.data)

Filed by @albertisfu

Copy link
Author

sentry-io bot commented May 7, 2024

This is another serialization error, likely related to an integer field that is missing in a document and not properly handled.

Sentry Issue: COURTLISTENER-76R

Filed by: @albertisfu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

No branches or pull requests

0 participants