CDB3-6607 500 error
haproxy[16638]: 176.124.133.66:37026 [01/Feb/2024:12:56:44.898] HaProxy80 KUBER/ingress-nlb-stg 1080/0/0/328/1408 200 2760 1705 - - ---- 242/100/69/69/0 0/0 40FE7F00000190A27F000001005065BB950C3821ADDDF "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "PUT /api/survey/forms/bffa71b1-5607-406e-b723-9454a6683b95?lang=uk_UA&public=true HTTP/1.1" "" "auction-sandbox.prozorro.sale" "https://auction-sandbox.prozorro.sale/"
| [2024-02-01 12:56:28,426] | ERROR | django.request | Internal Server Error: /api/survey/forms/bffa71b1-5607-406e-b723-9454a6683b95 |
|---------------------------------------------------------------------------------------------------------------------------------------|
[2024-02-01 12:56:28,425] | ERROR | survey.middlewares | Unknown error caught in API - get() returned more than one Survey -- it returned 2!
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/survey/survey/forms/views.py", line 61, in put
survey = get_object_or_404(
File "/usr/local/lib/python3.9/site-packages/django/shortcuts.py", line 76, in get_object_or_404
return queryset.get(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 439, in get
raise self.model.MultipleObjectsReturned(
survey.forms.models.survey.Survey.MultipleObjectsReturned: get() returned more than one Survey -- it returned 2!
Необходимо:
- Написать тест
- Выяснить причину возникновения, где логика несоответствует
- Добавить прокидывание реквест айди в логи (по аналогии с порталом marketplace-portal@5654931e marketplace-portal@3ff0502c)
Edited by Pavel Kuzmenko