Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1542

Odata client drops the error if error details are empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • odata4-client
    • None

    Description

      ODataErrorResponseChecker.java, checkResponse().

      As the following code shows, if error doesn't have a detail, it will be dropped, so client can't get error message.  Maybe we also need to take the error message into consideration.

        if (statusLine.getStatusCode() >= 500 && error!= null && 
            (error.getDetails() == null || error.getDetails().isEmpty()) && 
            (error.getInnerError() == null || error.getInnerError().size() == 0)) {
          result = new ODataServerErrorException(statusLine);
        } else {
          result = new ODataClientErrorException(statusLine, error);
        }
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            Paul Sun Paul Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: