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

Update error code and message for alerts emails validation in C8SaaS

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 3.10.0-alpha3, 3.10.0
    • None
    • backend
    • None
    • Not defined

      CONTEXT:

      In C8SaaS, the list of recipients for an alert is validated by the BE. If one of those addresses doesn't belong to a member of the Cloud organisation, the following error is returned by the API:

      {
        "errorCode" : "badRequestError",
        "errorMessage" : "The server was unable to process the request.",
        "detailedMessage" : "Users with the following email addresses are not available for receiving alerts: [najsda@sidjisd.com]",
        "reportDefinition" : null
      } 

      Frontend always displays errorMessage or a translated error message based on errorCode, but right now the error code is generic and it's not clear what it is about until you take a look into detailedMessage.

      AT:

      • there should be specific error code for this event "invalidAlertEmails"
      • there should be a part of the error which contains only the invalid emails without any extra text, to make it easy to use with translated error code message
      • the error should look like this:
      {
        "errorCode": "invalidAlertEmailAddresses",
        "errorMessage" : "Users with the following email addresses are not available for receiving alerts: [najsda@sidjisd.com]",
        "detailedMessage" : "Users with the following email addresses are not available for receiving alerts: [najsda@sidjisd.com]",
        "reportDefinition": null,
        "invalidAlertEmailAddresses": "email1@mail.com, email2@mail.com",
      } 

      HOW TO TEST:

      • Start Optimize in Cloud mode
      • Set up an email alert for a not existent email address
      • Open the network tab, the error response should be displayed there

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              michal.konopski Michal Konopski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: