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

Delivery endpoint should return 4** codes for non-existant resource or entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.1
    • None
    • None
    • None

      Currently the delivery returns a 500 error code when it should return a 4** type error code when the client is attempting to reference a delivery endpoint or entity that does not exist.
      Also, the response should not mention the RESTEASY library.
      It also seems strange that this results in an exception in the log - is this desired behaviour?

      To reproduce missing resource:
      Request: http://localhost:8080/magnoliaAuthor/.rest/delivery/fdjsk

      Result:
      500 response code.
      Response body: "RESTEASY003210: Could not find resource for full path: http://localhost:8080/magnoliaAuthor/.rest/delivery/fdjsk"
      Exception and stack trace in log
      The system should not return RESTEASY in a response as this is an implementation detail and should not be exposed to clients.

      To reproduce missing entity:
      Request: localhost:8080/magnoliaAuthor/.rest/delivery/tours/v1/magnolia-travels/A-Taste-of-Malaysia2

      Result
      500 response code
      Response body: /magnolia-travels/A-Taste-of-Malaysia2
      Exception and stack trace in log


      In general 4** response codes should be used whenever the client makes an error in the request, and 500 should be used when the server/system is malfunctioning / overloaded.

        Acceptance criteria

              hieu.nguyen Hieu Nguyen Duc
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - 2d
                    2d
                    Remaining:
                    Time Spent - 1d 3h Remaining Estimate - 5h
                    5h
                    Logged:
                    Time Spent - 1d 3h Remaining Estimate - 5h
                    1d 3h