Call to a function that is not defined
critical
The function name is neither a PAC helper, an ES5 global, nor defined in the file. The branch throws when reached and the engine treats the request as a script failure.
Why it matters
A misspelt helper (isInNetwork, dnsdomainIs, ShExpMatch) parses fine and only fails
when that line is executed. The thrown ReferenceError aborts the whole evaluation, so
the deliberate default route at the end of the function is never reached. Chromium records
a PAC script error and falls back to DIRECT for that request; other engines also do not
apply the intended proxy. Because the failure is per request and per code path, desk
tests that never hit the branch pass.
Ex-functions (isInNetEx, dnsResolveEx, …) are defined only in some engines and are
reported separately by PAC-K003.
How to fix
Correct the spelling (PAC helpers are case-sensitive) or define the helper function in the file.
Examples
Bad
function FindProxyForURL(url, host) {
if (isInNetwork(host, "10.0.0.0", "255.0.0.0")) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open bad example in checkerGood
function FindProxyForURL(url, host) {
if (isInNet(host, "10.0.0.0", "255.0.0.0")) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open good example in checkerEngine behaviour
| Engine | Behaviour | Source |
|---|---|---|
| chromium | An exception inside FindProxyForURL fails the evaluation (ERR_PAC_SCRIPT_FAILED); the request falls back to DIRECT unless ProxyPacMandatory is set. | code, verified 2026-10-04 · ref |
Related rules
- Evaluation throws an exception PAC-E006
- IPv6 extension functions (isInNetEx, dnsResolveEx, myIpAddressEx) PAC-K003
- alert() used in the PAC PAC-K002