Search REST API fails on casting error "ContentConvertible" related to the Space description

XMLWordPrintable

    • 2
    • Severity 2 - Major
    • 0

      Issue Summary

      Attachments without a page/blog container (e.g. a custom space logo (SPACEDESCRIPTION)) throw a HTTP 500 error when a REST API request is made for attachments.

      Steps to Reproduce

      1. Create an attachment without page container - for example upload a space logo (`/spaces/configurespacelogo.action?key=TEST`)
      2. Run a REST API request such as:
      /rest/api/search?limit=100&expand=content.space,content.extension,content.history,content.history.lastUpdated,content.history.previousVersion,content.container,content.metadata&cql=type=attachment+order+by+lastmodified+asc&start=0 

      Specifically, the following parameters will result in the issue:

      • content.history
      • content.history.lastUpdated
      • content.history.previousVersion

      Expected Results

      No error and attachments are returned successfully.

      Actual Results

      API returns 500 error with the following stack trace in logs:

      2025-12-05 17:32:27,574 ERROR [http-nio-9001-exec-6237 url: /rest/api/search; user: lou] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : 
       -- url: /rest/api/search | userName: lou | traceId: 111a3a3c6d5acee0
      com.atlassian.confluence.api.impl.pagination.BatchExecutionException: Error during batch execution with session management
      	at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.lambda$doRequestInTransaction$1(PaginationServiceImpl.java:269)
      [.......]
      Caused by: com.atlassian.confluence.api.service.exceptions.BadRequestException: The entity spacedesc: Lou Test (10617100) is not ContentConvertible or API available
      	at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.buildersFrom(ContentFactory.java:154)
      

      Workaround

      None

            Assignee:
            Unassigned
            Reporter:
            Matthieu Theriault
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: