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
Internal Server Error: /api/chats/
Traceback (most recent call last):
File "projects\giosg_sample_app\ext_connectivity_example\chat_app\views.py", line 44, in perform_create
existing_visitor = models.Visitor.objects.get(visitor_name=serializer.validated_data["visitor_name"])
File "Anaconda3\envs\py38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "Anaconda3\envs\py38\lib\site-packages\django\db\models\query.py", line 439, in get
raise self.model.DoesNotExist(
chat_app.models.Visitor.DoesNotExist: Visitor matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Anaconda3\envs\py38\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "Anaconda3\envs\py38\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "Anaconda3\envs\py38\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "Anaconda3\envs\py38\lib\site-packages\rest_framework\viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "Anaconda3\envs\py38\lib\site-packages\rest_framework\views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "Anaconda3\envs\py38\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "Anaconda3\envs\py38\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
raise exc
File "Anaconda3\envs\py38\lib\site-packages\rest_framework\views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "projects\giosg_sample_app\ext_connectivity_example\chat_app\views.py", line 38, in create
self.perform_create(serializer)
File "projects\giosg_sample_app\ext_connectivity_example\chat_app\views.py", line 59, in perform_create
giosg_visitor_global_id=visitor["visitor_global_id"],
KeyError: 'visitor_global_id'
As it's the most up-to-date sample app, maybe it would be possible to check if the code or API documentation corresponds to the actual server response. @ariniinimaki@mentholi
Authentication call from frontend fails in Python app because there's no
visitor_global_id
in response.The response from
/api/v5/public/orgs/<organization_id>/auth
is:while in the API docs
visitor_global_id
is present: https://docs.giosg.com/api_reference/giosg_live/giosg_public_http_api/general/The error is:
I hotfixed it by adding a line
in ext_connectivity_example/chat_app/views.py after
The text was updated successfully, but these errors were encountered: