resp.is_locally_generated

BOOL, read-only.

Available indeliverlog

Whether request handling went through vcl_error.

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

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)