add request path to the 404 error message
validate expression and abort if invalid