I'm currently working with .NET 8, OData 9, EF Core 8, and PostgreSQL. When I make requests using certain OData queries that are valid in OData but incompatible with EF Core, the response I receive is broken JSON with 200 status code
instead of a clear error message. Here are a couple of example queries that reproduce the issue:
?$expand=Orders($compute=Amount div 0 as test; $select = *;)
?$expand=AllMovies($filter=category/any(x: x eq null))
If anyone has suggestions or knows of a way to handle or catch these errors gracefully, I’d appreciate your input.
Hello everyone,
I'm currently working with .NET 8, OData 9, EF Core 8, and PostgreSQL. When I make requests using certain OData queries that are valid in OData but incompatible with EF Core, the response I receive is broken JSON with 200 status code instead of a clear error message. Here are a couple of example queries that reproduce the issue:
?$expand=Orders($compute=Amount div 0 as test; $select = *;) ?$expand=AllMovies($filter=category/any(x: x eq null)) If anyone has suggestions or knows of a way to handle or catch these errors gracefully, I’d appreciate your input.