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

REST api: allow ezpRestMvcController to catch all errors from extension code

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 2011.10, 4.6.0beta1
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently ezpRestMvcController::createResult does catch any unknown exception generated by custom actions - which is good, as actions might be developed by 3rd party, and we never should trust them.

      The problem happens when eZP is set to display warnings and other non fatal errors - in such case, if a warning is generated while executing a REST action, it will end up as part of the response, thus breaking the response (expected response format being json most of the time, I guess).

      It would be a good idea to use ob_start or similar techniques to prevent the rest action to generate any output that would end up directly onscreen.

        Activity

        Hide
        Gaetano Giunta added a comment -

        Of course I meant set_error_handler, as ob_start itself is not enough...

        Show
        Gaetano Giunta added a comment - Of course I meant set_error_handler, as ob_start itself is not enough...

          People

          • Assignee:
            unknown
            Reporter:
            Gaetano Giunta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: