Shindig
  1. Shindig
  2. SHINDIG-1749

Common Container should log detailed error messages when a gadget fails to navigate or preload

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.5.0-beta2
    • Component/s: Javascript
    • Labels:
      None

      Description

      If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object.

      The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error.

        Activity

        Stanton Sievers created issue -
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4738/
        -----------------------------------------------------------

        Review request for shindig.

        Summary
        -------

        I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it?

        From JIRA:

        If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object.

        The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error.

        This addresses bug SHINDIG-1749.
        https://issues.apache.org/jira/browse/SHINDIG-1749

        Diffs


        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773
        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773

        Diff: https://reviews.apache.org/r/4738/diff

        Testing
        -------

        Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases.

        "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml. HTTP error 404"

        Thanks,

        Stanton

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/ ----------------------------------------------------------- Review request for shindig. Summary ------- I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it? From JIRA: If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object. The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error. This addresses bug SHINDIG-1749 . https://issues.apache.org/jira/browse/SHINDIG-1749 Diffs http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773 http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773 Diff: https://reviews.apache.org/r/4738/diff Testing ------- Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases. "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml . HTTP error 404" Thanks, Stanton
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4738/#review6942
        -----------------------------------------------------------

        I think I personally prefer logging the whole message once at the warn level.
        +1 for the change to add more details to the message, though.

        • Dan

        On 2012-04-16 16:33:28, Stanton Sievers wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4738/

        -----------------------------------------------------------

        (Updated 2012-04-16 16:33:28)

        Review request for shindig.

        Summary

        -------

        I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it?

        From JIRA:

        If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object.

        The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error.

        This addresses bug SHINDIG-1749.

        https://issues.apache.org/jira/browse/SHINDIG-1749

        Diffs

        -----

        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773

        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773

        Diff: https://reviews.apache.org/r/4738/diff

        Testing

        -------

        Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases.

        "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml. HTTP error 404"

        Thanks,

        Stanton

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/#review6942 ----------------------------------------------------------- I think I personally prefer logging the whole message once at the warn level. +1 for the change to add more details to the message, though. Dan On 2012-04-16 16:33:28, Stanton Sievers wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/ ----------------------------------------------------------- (Updated 2012-04-16 16:33:28) Review request for shindig. Summary ------- I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it? From JIRA: If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object. The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error. This addresses bug SHINDIG-1749 . https://issues.apache.org/jira/browse/SHINDIG-1749 Diffs ----- http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773 http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773 Diff: https://reviews.apache.org/r/4738/diff Testing ------- Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases. "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml . HTTP error 404" Thanks, Stanton
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4738/#review6949
        -----------------------------------------------------------

        Ship it!

        LGTM

        • Ryan

        On 2012-04-16 16:33:28, Stanton Sievers wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4738/

        -----------------------------------------------------------

        (Updated 2012-04-16 16:33:28)

        Review request for shindig.

        Summary

        -------

        I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it?

        From JIRA:

        If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object.

        The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error.

        This addresses bug SHINDIG-1749.

        https://issues.apache.org/jira/browse/SHINDIG-1749

        Diffs

        -----

        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773

        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773

        Diff: https://reviews.apache.org/r/4738/diff

        Testing

        -------

        Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases.

        "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml. HTTP error 404"

        Thanks,

        Stanton

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/#review6949 ----------------------------------------------------------- Ship it! LGTM Ryan On 2012-04-16 16:33:28, Stanton Sievers wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/ ----------------------------------------------------------- (Updated 2012-04-16 16:33:28) Review request for shindig. Summary ------- I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it? From JIRA: If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object. The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error. This addresses bug SHINDIG-1749 . https://issues.apache.org/jira/browse/SHINDIG-1749 Diffs ----- http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773 http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773 Diff: https://reviews.apache.org/r/4738/diff Testing ------- Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases. "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml . HTTP error 404" Thanks, Stanton
        Stanton Sievers committed 1328043 (2 files)
        Reviews: none

        SHINDIG-1749 | Common Container should log detailed error messages when a gadget fails to navigate or preload

        Stanton Sievers made changes -
        Field Original Value New Value
        Attachment PreloadAndNavigateErrorLog.patch [ 12523366 ]
        Hide
        Stanton Sievers added a comment -

        Committed revision 1328043.

        Show
        Stanton Sievers added a comment - Committed revision 1328043.
        Stanton Sievers made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4738/#review7037
        -----------------------------------------------------------

        Ship it!

        Committed revision 1328043.

        • Stanton

        On 2012-04-16 16:33:28, Stanton Sievers wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4738/

        -----------------------------------------------------------

        (Updated 2012-04-16 16:33:28)

        Review request for shindig.

        Summary

        -------

        I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it?

        From JIRA:

        If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object.

        The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error.

        This addresses bug SHINDIG-1749.

        https://issues.apache.org/jira/browse/SHINDIG-1749

        Diffs

        -----

        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773

        http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773

        Diff: https://reviews.apache.org/r/4738/diff

        Testing

        -------

        Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases.

        "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml. HTTP error 404"

        Thanks,

        Stanton

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/#review7037 ----------------------------------------------------------- Ship it! Committed revision 1328043. Stanton On 2012-04-16 16:33:28, Stanton Sievers wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4738/ ----------------------------------------------------------- (Updated 2012-04-16 16:33:28) Review request for shindig. Summary ------- I'm always up for recommendations on how to best log these details. I considered refactoring this logging to get some re-use. Does anyone think it's worth it? From JIRA: If in the process of preloading or navigating a gadget something fails, the common container will log warnings, "Failed to preload gadget <gadget url>." and "Failed to navigate for gadget <gadget url>.", respectively. However, it only logs these errors upon the existence of the "error" object in the response. It does not log any of the information contained within the "error" object. The proposed improvement would be to log the detailed information in the "error" object. This includes both the HTTP status code and a detailed message. This information is more usable when trying to determine the root cause of the error. This addresses bug SHINDIG-1749 . https://issues.apache.org/jira/browse/SHINDIG-1749 Diffs ----- http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js 1324773 http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js 1324773 Diff: https://reviews.apache.org/r/4738/diff Testing ------- Tested in the sample common container page. Executed "Preload and Add", "Add only", and "Preload only" actions for a gadget url that didn't exist. Verified that the detailed 404 message was logged in all cases. "Detailed error: 404 Unable to retrieve spec for http://localhost:8080/samplecontainer/examples/NonExistent.xml . HTTP error 404" Thanks, Stanton
        Ryan Baxter made changes -
        Fix Version/s 2.5.0-beta2 [ 12321670 ]
        Fix Version/s 2.5.0 [ 12320364 ]

          People

          • Assignee:
            Stanton Sievers
            Reporter:
            Stanton Sievers
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development