PAC-E005 · unknown-function-call

Call to a function that is not defined

critical · Errors and robustness

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 checker

Good

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 checker

Engine behaviour

EngineBehaviourSource
chromiumAn 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

Source: code = read in the engine's source, doc = vendor documentation, lab = observed in a lab run, expert = practitioner knowledge, not yet verified.

Related rules

References