Can Azure Event Grid run a logic before it returns a response back to its callers?
Looking for something similar to the delegator in the web.api pipeline.
For example, we have a flag somewhere (in app.config or keyvault), and then Event Grid looks at the flag and send its response back based on the flag. The flag might be 'on' or 'Audit mode' or 'turned off' when the flag is on, Event grid returns 200 ok, When 'audit mode' return a different http status code Or when 'turned off' returns 404
My question is not about the status code but if Event grid can run a logic before it returns a response back to the caller synchronously.
Thank you so much
Investigated Azure documentation but couldn't find a solution.