Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-275

Rest returning CORS error when should return 404 or 500 or not authorized.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • None
    • None

      A delivery endpoint which is able to successfully return a response to a browser when there is no error in the request - should also successfully return an error response when a problem occurs. Currently, it does not. For some reason when the delivery endpoint returns an error message - such as in the case of a 404 or 500 - the browser shows a CORS error and does not return the error response as expected.

      Details

      When calling delivery rest endpoints and response is e.g.
      "error":

      { "code": "notFound", "message": "Could not find resource for full path: http://127.0.0.1:8080/.rest/customer/journey/undefined?lang=en" }

      or not authorized, or some 500 in rest call Magnolia returns CORS error.

      It creates HUGE confusion in finding the real cause of error.
      In couple cases blocked POC prospects for days as they did not knew what else to do.

      CORS is correctly added naturally

      Timeboxed for investigation: 3 SP

        Acceptance criteria

              jsimak Jaroslav Simak
              bstaryga Bartosz Staryga
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD