Skip to content

MyData API Endpoint - don't return error for empty result set #11447

@ekraffmiller

Description

@ekraffmiller

What steps does it take to reproduce the issue?
Call the MyData endpoint for a user that has no associated data. It should return successfully, with an empty list of items.
Instead, it returns an error response:
{"success":false,"error_message":"Sorry, no results were found."}
This makes it hard to distinguish between zero results, which is not an error, and other unexpected errors.

  • What did you expect to happen?
    Return a normal response, with an empty list of items.
    For example,
{
    "success": true,
    "data": {
        "pagination": {
            "numResults": 0,
           . . . etc
        },
        "items": [],
        "total_count": 0,
        . . . etc
}

Which version of Dataverse are you using?
latest develop branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    GREI Re-archIssues related to the GREI Dataverse rearchitectureSPAThese changes are required for the Dataverse SPASPA.Q2.1Account Page: My Data SectionSize: 30A percentage of a sprint. 21 hours. (formerly size:33)Type: Buga defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions