Uploaded image for project: 'Red Hat OpenBridge'
  1. Red Hat OpenBridge
  2. MGDOBR-704

Malformed transformation template API error

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • Service Preview
    • None
    • None
    • None
    • False
    • None
    • False
    • MGDOBR - Sprint 218, MGDOBR - Sprint 219, MGDOBR - Sprint 220

      Issue Description: When creating a processor calling POST /api/v1/bridges/{bridgeId}/processors with an invalid transformation template, the endpoint returns a 400 error with the following response:

      {
        "exception": null,
        "propertyViolations": [],
        "classViolations": [],
        "parameterViolations": [
          {
            "constraintType": "PARAMETER",
            "path": "addProcessorToBridge.processorRequest.transformationTemplate",
            "message": "Transformation template malformed: Parser error on line 1: unexpected non-text buffer at the end of the template - unterminated tag: sdfsd.sdf    ",
            "value": "{sdfsd.sdf    "
          }
        ],
        "returnValueViolations": []
      } 

      Acceptance Criteria: The error response should be in the proper format, with id, reason etc. Like this example error for an invalid processor name:

      {
        "kind": "Error",
        "id": "1",
        "href": "/api/v1/errors/1",
        "code": "OPENBRIDGE-1",
        "reason": "Processor with name 'test name' already exists for bridge with id '22013906-f9d6-4e8f-898b-07bc04311449' for customer '53160135'"
      } 

      Out of Scope: -

      Additional Information: -

              manstis@redhat.com Michael Anstis
              robertoemanuel Roberto Emanuel
              Jozef Marko Jozef Marko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: