Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-195

HTTP 500 is returned due to KeyError exception in c.r.c.

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.2
    • 4.2.1-b1
    • Backend
    • None
    • AAH 4.3.0 Sprint 3

      The request has failed due to KeyError exception and returned response code 500.

      2020-12-02 11:52:13,366 ERROR django.request: Internal Server Error: /api/automation-hub/v3/_ui/collections/ptjechoi2/new_collection/
      Traceback (most recent call last):
        File "/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
          response = get_response(request)
        File "/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
          response = self.process_exception_by_middleware(e, request)
        File "/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
          response = wrapped_callback(request, *callback_args, **callback_kwargs)
        File "/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
          return view_func(*args, **kwargs)
        File "/venv/lib64/python3.6/site-packages/rest_framework/viewsets.py", line 114, in view
          return self.dispatch(request, *args, **kwargs)
        File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch
          response = self.handle_exception(exc)
        File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception
          self.raise_uncaught_exception(exc)
        File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
          raise exc
        File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch
          response = handler(request, *args, **kwargs)
        File "/venv/lib64/python3.6/site-packages/rest_framework/mixins.py", line 54, in retrieve
          instance = self.get_object()
        File "/app/galaxy_ng/app/api/ui/viewsets/collection.py", line 51, in get_object
          distro_content = self.get_distro_content(self.kwargs["path"])
      KeyError: 'path'
      

       

      Environment:

      automation-hub-prod (cloud)

       

      Expected behavior:
      Appropriate response code must be returned (e.g. 400 BadRequest)

       

              rochacbruno@redhat.com Bruno Rocha
              osapryki Oleksandr Saprykin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: