Uploaded image for project: 'Red Hat OpenShift AI Engineering'
  1. Red Hat OpenShift AI Engineering
  2. RHOAIENG-4469

500 when trying to POST to Images API endpoint

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • No
    • No
    • Low
    • Testable

      During the test execution, we are able to see that:

      1. Using a regular user and trying to perform a POST against /api/images it returns a 401, which is correct: 
        [info (+0.01s)] POST Request: {'url': 'https://rhods-dashboard-redhat-ods-applications.apps.ods-qe-psi-07.osp.rh-ods.com/api/images', 'headers': {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': '_oauth_proxy=***hidden***', 'Content-type': 'application/json', 'Content-Length': '126'}, 'body': {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': '_oauth_proxy=***hidden***', 'Content-type': 'application/json', 'Content-Length': '126'}, 'status_code': 401}
        
        [info (+0.01s)] POST Response: {'url': 'https://rhods-dashboard-redhat-ods-applications.apps.ods-qe-psi-07.osp.rh-ods.com/api/images', 'headers': {'content-length': '124', 'content-type': 'application/json; charset=utf-8', 'date': 'Wed, 13 Mar 2024 10:39:16 GMT', 'gap-auth': 'ldap-user2@cluster.local', 'gap-upstream-address': 'localhost:8080', 'strict-transport-security': 'max-age=31536000;includeSubDomains;preload', 'set-cookie': 'dc1d87df88ca392186fbfb9d4096dc66=1e43fb2cc25b1e94414bdb8dc14deae3; path=/; HttpOnly; Secure; SameSite=None'}, 'body': '{"statusCode":401,"code":"401","error":"Unauthorized","message":"You lack the sufficient permissions to make this request."}', 'status_code': 401, 'reason': 'Unauthorized'}
        
        [info] ${response} = {'statusCode': 401, 'code': '401', 'error': 'Unauthorized', 'message': 'You lack the sufficient permissions to make this request.'} 
      1. Using an admin user and trying to perform a POST against /api/images it returns a 500, which is wrong (200 is expected):
        info (+0.01s)] POST Request: {'url': 'https://rhods-dashboard-redhat-ods-applications.apps.ods-qe-psi-07.osp.rh-ods.com/api/images', 'headers': {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': '_oauth_proxy=***hidden***', 'Content-type': 'application/json', 'Content-Length': '126'}, 'body': {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Cookie': '_oauth_proxy=***hidden***', 'Content-type': 'application/json', 'Content-Length': '126'}, 'status_code': 500}
        
        [info (+0.01s)] POST Response: {'url': 'https://rhods-dashboard-redhat-ods-applications.apps.ods-qe-psi-07.osp.rh-ods.com/api/images', 'headers': {'content-length': '115', 'content-type': 'application/json; charset=utf-8', 'date': 'Wed, 13 Mar 2024 10:39:27 GMT', 'gap-auth': 'ldap-admin1@cluster.local', 'gap-upstream-address': 'localhost:8080', 'strict-transport-security': 'max-age=31536000;includeSubDomains;preload', 'set-cookie': 'dc1d87df88ca392186fbfb9d4096dc66=7d39978e27862c5d1c282c8210b4eff1; path=/; HttpOnly; Secure; SameSite=None'}, 'body': '{"statusCode":500,"error":"Internal Server Error","message":"Cannot read properties of undefined (reading \'trim\')"}', 'status_code': 500, 'reason': 'Internal Server Error'}
        
        [info] ${response} = {'statusCode': 500, 'error': 'Internal Server Error', 'message': "Cannot read properties of undefined (reading 'trim')"} 

        {'statusCode': 500, 'error': 'Internal Server Error', 'message': "Cannot read properties of undefined (reading 'trim')"} 

       

      API Info: https://access.redhat.com/articles/7047935 

            Unassigned Unassigned
            rh-ee-fealonso Federico Alonso
            RHOAI Dashboard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: