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

Filter phenomenonTime in $expand causes a truncated response #1624

Open
DanielBertocci opened this issue Jul 3, 2023 · 1 comment
Open
Labels

Comments

@DanielBertocci
Copy link

DanielBertocci commented Jul 3, 2023

Bug Description

In some situations like using the $expand operator and $filter on phenomenonTime, causes a truncated response with an invalid JSON.

Current Behavior:
The server response is 200 OK with the following body:
{ "value": [

Expected Behavior:
A 4xx http error warning that despite the input is ISO8601 compliant, the server accepts only UTC complete datetimes or a valid json response

Steps to Reproduce:

  1. Have a Thing and a Datastream stored
  2. Execute one of the following queries:
    • Things?$expand=Datastreams($filter=phenomenonTime gt 2000-01-01)
    • Things?$expand=Datastreams($filter=phenomenonTime/start gt 2000-01-01)

Screenshots:
image

Environment

Application Version:
2.2.0 (but I have experienced it also in previous versions)

@hylkevds
Copy link
Member

hylkevds commented Jul 3, 2023

Hmm, indeed. This is because the $expand isn't fully evaluated until it is required, and by then the output has already started. Because of that, the result-code can't be changed to an error any more.

@hylkevds hylkevds added the bug label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants