Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-3496

Entities endpoint fails if there is an report with an empty string key

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 3.0.0
    • 3.0.0
    • backend
    • None

    Description

      This was caused by an old dataset. It's not clear why the id was an empty string, for new reports it's null but we should fix this issue.
      Endpoint //api/entities

      Given:
      There is a stored report with an empty string ad definition key (not the case for new reports but

      When:
      I request /api/entities

      Then:
      I get a 500 response

      14:23:04.226 [qtp1170111701-17] ERROR o.c.o.r.p.GenericExceptionMapper - Mapping generic REST error
      org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: id is missing;
      	at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:26)
      	at org.elasticsearch.action.get.GetRequest.validate(GetRequest.java:115)
      	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1399)
      	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1373)
      	at org.elasticsearch.client.RestHighLevelClient.get(RestHighLevelClient.java:699)
      	at org.camunda.optimize.service.es.OptimizeElasticsearchClient.get(OptimizeElasticsearchClient.java:140)
      	at org.camunda.optimize.service.es.reader.EventProcessMappingReader.getEventProcessRoles(EventProcessMappingReader.java:116)
      	at org.camunda.optimize.service.EventProcessRoleService.getRoles(EventProcessRoleService.java:33)
      	at org.camunda.optimize.service.security.EventProcessAuthorizationService.isAuthorizedToEventProcess(EventProcessAuthorizationService.java:45)
      	at org.camunda.optimize.service.security.DefinitionAuthorizationService.isAuthorizedToAccessDefinition(DefinitionAuthorizationService.java:82)
      	at org.camunda.optimize.service.security.ReportAuthorizationService.isAuthorizedToAccessProcessReportDefinition(ReportAuthorizationService.java:88)
      	at org.camunda.optimize.service.security.ReportAuthorizationService.isAuthorizedToAccessReportDefinition(ReportAuthorizationService.java:63)
      	at org.camunda.optimize.service.security.AuthorizedEntitiesService.lambda$getAuthorizedPrivateEntities$1(AuthorizedEntitiesService.java:43)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      

      Expected:
      a response

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              sebastian.bathke Sebastian Bathke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce