ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
56 stars 40 forks source link

Framework error 500 when providing a include that is either not "included" or does not exist #109

Closed m0rt3nlund closed 10 months ago

m0rt3nlund commented 10 months ago

Describe the bug When you request a "include" that is not provided in the list of "includes" in the Resource description or request an "include" that does not exist as a relationship on the resource the framework returns error 500, spec for json api says to return 400.

To Reproduce Request using URL: https://localhost:443/api/myresource?include=invalid

Expected behavior Expects the API to return 400

** Runtime

Additional context Add any other context about the problem here.

jimsynz commented 10 months ago

Thanks for the bug report!