Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27476

Integrate Symfony errors into the Hybrid Platform UI app

    XMLWordPrintable

Details

    Description

      Symfony error pages should be updated to be integrated into the Hybrid Platform UI app.

      AJAX Update

      So when a request with the X-AJAX-Update update generates an error (404, 403 or 500), the response should be a JSON Update structure.

      For instance for a 404, the structure should be:

      {
          "selector": "ez-platform-ui-app",
          "update": {
              "properties": {
                  "notifications": [{
                      "type": "error",
                      "timeout": 0,
                      "content": "<span class='ez-notification-description'>Not Found</span> <span class='ez-notification-http-code'>404</span><a href='/admin/broken/page' class='ez-notification-uri'>/admin/broken/page</a>",
                      "copyable": true,
                      "details": "Exception message or stack trace in dev + the Request headers and body that triggered the error"
                  }]
              }
          }
      }
      

      update.properties.notifications is an array objects describing notification as in cases other than error it can give several notification to the user. For server side errors, type is always error, timeout is always set to 0, copyable is always true and details should contain the actual error/exception message or the full stack trace when in dev environment (or debug is true ?). The details won't be shown to the user but as described in EZP-27374, she will be able to copy that to the clipboard (and others tech info). The content is of course different depending the status code, see the description in EZP-27374.

      The update of others element in the page (toolbar, navigation hub are intentionally missing as the app actually keeps on displaying the previous page.

      Full page generation

      When the user directly reaches an error page, the error should be integrated into the Hybrid Platform UI app, so basically the app page should be generated as any other page ie the <ez-server-side-content> element should contain the SF generated error (note the actual content is to be defined by PM so in a first step wrapping the Symfony generated content into <ez-server-side-content> is fine I guess)

      Attachments

        Activity

          People

            Unassigned Unassigned
            damien.pobel-obsolete@ez.no Damien Pobel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: