Try our conversational search powered by Generative AI!

Profile API: Server error when ordering without value

Found in

EPiServer.Profiles 1.4.0

Fixed in

EPiServer.Profiles.Client 1.5.0

(Or a related package)

Created

Feb 28, 2018

Updated

Sep 13, 2018

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Do ordering data with

GET /?$orderBy= asc 

Expected:
Status 400 Bad Request returns with

{
    "error": {
        "code": "400",
        "message": "The value '' is not valid.",
        "target": "",
        "details": []
    }
}

Actual:
Status 500 Internal Server Error returns with

{
    "error": {
        "code": "500",
        "message": "Server error occurred.",
        "target": "",
        "details": []
    }
}

Same issue when orderby non-existing property, e.g. abc, 123 (GET /?$orderBy=123 asc)