Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort keys in get datasets v4 #1561

Open
nitrosx opened this issue Dec 13, 2024 · 0 comments
Open

Sort keys in get datasets v4 #1561

nitrosx opened this issue Dec 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working DCS DAPHNE Contribution to SciCat

Comments

@nitrosx
Copy link
Contributor

nitrosx commented Dec 13, 2024

Summary

When I place a GET request to api/v4/datasets, you receive a 500 error.

[Nest] 17330  - 12/13/2024, 1:20:19 PM   ERROR "Internal server error"
[Nest] 17330  - 12/13/2024, 1:20:19 PM   ERROR MongoServerError: $sort stage must have at least one sort key
[Nest] 17330  - 12/13/2024, 1:20:19 PM   ERROR Object:
{
  "requestUrl": "/api/v4/datasets",
  "requestUser": null,
  "statusCode": 500
}

Steps to Reproduce

Open swagger interface and place a GET request on Dataset v4 with no filters.

Current Behaviour

A GET on /api/v4/datasets with no filters, results in a 500 errors

Expected Behaviour

A GET on /api/v4/datasets with no filters, should results in a list of n datasets in the order provided by the database

@nitrosx nitrosx added bug Something isn't working DCS DAPHNE Contribution to SciCat labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DCS DAPHNE Contribution to SciCat
Projects
None yet
Development

No branches or pull requests

4 participants