Currently, the "checkFieldsExpression=false|true" servlet parameter allows an implementor to return an error an an API request containing an invalid field expression is received.
There should be a way to have more control over the action when receiving an invalid field expression.
For example:
- checkFieldsExpression=false => do nothing (current implementation)
- checkFieldsExpression=log => logs as warn in server logs
- checkFieldsExpression=headerOutput => same as "log", and returns an error in the response header "X-Endpoints-invalidFieldsExpression" so the requestor can check what is wrong
- checkFieldsExpression=true => return an error (current implementation)
Currently, the "checkFieldsExpression=false|true" servlet parameter allows an implementor to return an error an an API request containing an invalid field expression is received.
There should be a way to have more control over the action when receiving an invalid field expression.
For example: