Whether request handling went through
Request handling will go through
vcl_error and a response will be generated
locally when the VCL executes the
error action or when Varnish encounters a
problem while handling the request, such as a communication failure with the
backend. This VCL variable allows you to distinguish locally generated error
responses from error responses received from upstream (from the origin or
from a shield pop).
All synthetic responses are generated in
vcl_error, not only error responses.
If you use
vcl_error to generate synthetic responses in non-error cases,
you might need to check
resp.status in combination with
resp.is_locally_generated to determine that a response is a locally
generated error response.
User contributed notes
We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.