Closed axetroy closed 4 years ago
Hello @axetroy,
Iris returns a special error on unknown incoming fields, you can use the iris.IsErrPath
to ignore that error on read query/form. Simply add an !iris.IsErrPath(err)
in your if statement
on the error returned from ctx.ReadQuery
and you are ready to go.
There are examples for that, but the ReadQuery
method missed a comment documentation. I've just added it there too.
If you are OK with the solution provided above, close the issue, if not, please post an idea for an alternative solution that will not require a breaking change of the ReadQuery
usage.
Thanks, Gerasimos Maropoulos
This is a solution for me, thanks @kataras
Is your feature request related to a problem? Please describe.
The query in url should be variable
If the client passes in an undefined field, then
context.ReadQuery()
should not throw an errorDescribe the solution you'd like
ignore undefined field
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.