Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3646

Improve error message when there is a missing storage resource configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Django Portal
    • None
    • Easy

    Description

      The Airavata User Portal SDK looks up a configured UserStorageProvider for a Data Product's Storage Resource. When it can't find a UserStorageProvider, an exception is raised, but it's not very helpful:

      API exception
      Traceback (most recent call la
      st):
        File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch
          response = handler(request, *args, **kwargs)
        File "/va
      r/www/portals/django-iu-geology-survey/airavata-django-portal/django_airavata/apps/api/views.py", line 819, in get
          return Response(serializer.data)
        File "/var/www/portals/django-iu-geology-surve
      y/venv/lib64/python3.6/site-packages/rest_framework/serializers.py", line 548, in data
          ret = super().data
        File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest_
      framework/serializers.py", line 246, in data
          self._data = self.to_representation(self.instance)
        File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest_framework/
      serializers.py", line 515, in to_representation
          ret[field.field_name] = field.to_representation(attribute)
        File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/rest
      _framework/fields.py", line 1882, in to_representation
          return method(value)
        File "/var/www/portals/django-iu-geology-survey/airavata-django-portal/django_airavata/apps/api/serializers.py", line 
      543, in get_downloadURL
          if user_storage.exists(request, data_product):
        File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/
      api.py", line 283, in exists
          storage_resource_id=storage_resource_id)
        File "/var/www/portals/django-iu-geology-survey/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/a
      pi.py", line 65, in get_user_storage_provider
          module_name, class_name = module_class_name.rsplit(".", 1)
      AttributeError: 'NoneType' object has no attribute 'rsplit'
      

      Attachments

        Issue Links

          Activity

            People

              marcuschristie Marcus Christie
              marcuschristie Marcus Christie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: