Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4049

Search method should return 204 NoContent or 200 with an empty page if no result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Needed

      Description

      When a search method doesn't find anything should return a

      • 204 no content if the expected result is a single object
      • 200 with an empty page, if the expected result was a collection

      An example of endpoint that currently have a wrong behavior is
      /api/eperson/eperson/search/byEmail?email=does.not.exist@xxxxxxxxx

      return 404 - NotFound.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bollini Andrea Bollini (4Science)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: