I am facing an invalid query parameter error from feathersjs back end . i am using react as front end. My request is .
I did not write this code initially. the $includeEc was already there, but that does not create an error. I know $include, $limit are there too and $limit is a feathersjs query.
If I remove $dis, there is no error. I need $dis to validate something on my API.
let data = {
$include: true,
$includeEc: true,
$limit: -1,
$dis: 91,
};
let res = await client.service('servicerequest').find({ query: data });
If I remove $dis there is no problem.
Custom query parameters prefixed with a
$must be explicitly allowed on your feathers service. This was added in feathers 4 in order to improve the default security profile and prevent unwanted params from being passed into the db adapters.From your example,
$limitis part of the common query interface, while the two$includeparams are likely pre-configured or otherwise allowed by your DB adapter.Read more about it here: Feathers Service Adapters: Whitelisting