Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32531

Stream management endpoint reports weird error when metrics are disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2021.55, 2023.13
    • Component/s: Streams
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #113
    • Story Points:
      2

      Description

      When metrics.enabled=false some stream management endpoints are returning obscure exceptions

      # list of streams
      curl -XGET -u Administrator:Administrator -H 'content-type: application/json' http://localhost:8080/nuxeo/api/v1/management/stream/streams 
      {"entity-type":"exception","status":400,"message":"java.lang.IllegalArgumentException: argument \"content\" is null"}
      
      # list of consumers
      curl -u Administrator:Administrator \
      > http://localhost:8080/nuxeo/api/v1/management/stream/consumers?stream=bulk/command
      {"entity-type":"exception","status":400,"message":"java.lang.IllegalArgumentException: argument \"content\" is null"}
      

      This is happening because the representation of processors and metrics are not known and exception is raised by StreamIntrospectionConverter:

      java.lang.IllegalArgumentException: argument "content" is null
      	at com.fasterxml.jackson.databind.ObjectMapper._assertNotNull(ObjectMapper.java:4757)
      	at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3040)
      	at org.nuxeo.ecm.core.bulk.introspection.StreamIntrospectionConverter.<init>(StreamIntrospectionConverter.java:53)
      

      This case should be handled or at least the message should be improved something like:
      "This stream introspection endpoint requires activation of metrics"

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: