Return 404 and no data when querying incorrect requestID

Found in

EPiServer.Profiles.Client 1.7.0

Fixed in

EPiServer.Profiles.Client 1.7.0

Created

Nov 02, 2018

Updated

Nov 30, 2018

State

Closed, Fixed and tested


Description

Precondition:
Scope = default and Profile= admin@example.com is in the system

Steps to reproduce
1. Send export profiledata with the scope and email below.

GET:  api/v1.0/ProfilesData/default/admin@example.com/export
It returns the response: 
{
    "Email": "admin@example.com",
    "RequestId": "cX1BWENXQk8BRHRySVBCOkpOAkUkfUQKElFLQwcRInARX0tUFEdWRiV0E1AXARQXbCIyKhYAHwA3AFYcNDY1EQMKAAJsFiUjERwfES0XVx8pKzAMCwQfBl8XbiYfBA",
    "ResultUrl": "https://profilesapi-inte01.profilestore.episerver.net/api/v1.0/ProfilesData/ExportResult/cX1BWENXQk8BRHRySVBCOkpOAkUkfUQKElFLQwcRInARX0tUFEdWRiV0E1AXARQXbCIyKhYAHwA3AFYcNDY1EQMKAAJsFiUjERwfES0XVx8pKzAMCwQfBl8XbiYfBA",
    "Scope": "default",
    "RequestedTime": "2018-11-02T09:26:47.9917692Z",
    "Status": "Accepted"
}

2. Check export profile data status by performing with apart of requestID

 
GET /api/v1.0/ProfilesData/ExportResult/cX1BWENXQk8BRHRySVBCOkpOAk
Actual result: It returns response as below:
{
    "Email": null,
    "RequestId": "cX1BWENXQk8BRHRySVBCOkpOAk",
    "Scope": null,
    "RequestedTime": "0001-01-01T00:00:00",
    "Status": "Invalid"
}

Expected:
404 result. We don't need to return any data in the body.