Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18980

Fix REST status code in case of failed request

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.15
    • None
    • Fixed REST status code in case of failed request
    • Release Notes Required

    Description

      GridRestResponse should obtain proper 'not-OK' status on error. Often, GridRestResponse#getSuccessStatus() is `GridRestResponse#STATUS_SUCCESS` even if the response is actually an error.

      Probably, we should revise GridRestResponse#setError(String). It should set/check an error status like GridRestResponse(int status, @Nullable String err)

      A test attached.

      Attachments

        1. RestProcessorSuccessStatusTest.java
          4 kB
          Vladimir Steshin

        Issue Links

          Activity

            People

              NSAmelchev Nikita Amelchev
              vladsz83 Vladimir Steshin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m