Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1576

Provide better error reporting for clients performing updates (or other operations)

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4
    • None
    • update
    • None

    Description

      It's frustrating from a client point of view to perform an update and then get back a 400 with no additional information. Would it make sense to supply an HTTP header with information about the error? I was thinking something like:

      X-SOLR-ERROR-MESSAGE: unknown field 'fooBarBaz'

      This would snap right into SolrDispatchFilter in sendError at line 363:

      res.addHeader("X-SOLR-ERROR-MESSAGE",ex.getMessage());

      Attachments

        Issue Links

          Activity

            At the moment the response formatting is at the whim of the servlet container – so you do get additional information, but it's servlet container dependent on how that error information is formatted.

            SOLR-141 aims to fix that by allowing response writer specific formatting of the underlying exception so the client has all the data available.

            hossman Chris M. Hostetter added a comment - At the moment the response formatting is at the whim of the servlet container – so you do get additional information, but it's servlet container dependent on how that error information is formatted. SOLR-141 aims to fix that by allowing response writer specific formatting of the underlying exception so the client has all the data available.

            Linking to SOLR-141 instead of marking as a Dup, because i definitely think there may be some value in having SolrDispatchFilter add some HTTP headers based on teh error as well (writer specific errors are still handy particularly for non-HTTP based communication, but that doesn't mean we can't have both)

            hossman Chris M. Hostetter added a comment - Linking to SOLR-141 instead of marking as a Dup, because i definitely think there may be some value in having SolrDispatchFilter add some HTTP headers based on teh error as well (writer specific errors are still handy particularly for non-HTTP based communication, but that doesn't mean we can't have both)
            paulrbrown Paul R. Brown added a comment -

            I ended up dealing with this particular item by implementing a custom update processor that puts a block with the document id and a messge into the response when an update fails.

            paulrbrown Paul R. Brown added a comment - I ended up dealing with this particular item by implementing a custom update processor that puts a block with the document id and a messge into the response when an update fails.
            erickerickson Erick Erickson added a comment -

            Ran across this randomly, can it be closed? hossman_lucene@fucit.org

            erickerickson Erick Erickson added a comment - Ran across this randomly, can it be closed? hossman_lucene@fucit.org

            People

              Unassigned Unassigned
              paulrbrown Paul R. Brown
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: