Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-352

500 ISE via api/repositories GET with bad UUID

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Content
    • None

      Making a GET request against the repositories endpoint with a malformed UUID will cause a 500 ISE due to a SQL error.

      In [6]: app.content_sources.rest_client.repositories_api.get_repository('1234')
      
      <irrelevant client side call stack>
      
          222     if 500 <= r.status <= 599:
      --> 223         raise ServiceException(http_resp=r)
          225     raise ApiException(http_resp=r)
          227 return rServiceException: (500)
      Reason: Internal Server Error
      HTTP response headers: HTTPHeaderDict({'content-length': '83', 'content-type': 'application/json; charset=UTF-8', 'date': 'Tue, 04 Oct 2022 14:45:40 GMT', 'server': 'Caddy', 'x-rh-identity': '<redacted>', 'x-rh-insights-request-id': '6qBmTL1CEp7lOGTglOZbl7ZyGUtkC7JO', 'set-cookie': 'f39fc78da674248e5eed0e30a3cf30d2=333e03064eca9ff3e3f3c9275ecadff7; path=/; HttpOnly; Secure; SameSite=None'})
      HTTP response body: {"message":"ERROR: invalid input syntax for type uuid: \"1234\" (SQLSTATE 22P02)"}

       

      This is likely a problem for  PUT/PATCH/DELETE, anywhere we lookup a repo config from a user supplied UUID

              rverdile@redhat.com Ryan Verdile
              mshriver Michael Shriver
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: