tymondesigns/jwt-auth · error · BadMethodCallException

The claim [%s] does not exist on the payload.

Error message

The claim [%s] does not exist on the payload.

What it means

Error "The claim [%s] does not exist on the payload." thrown in tymondesigns/jwt-auth.

Source

Thrown at src/Payload.php:283

     * Magically get a claim value.
     *
     * @param  string  $method
     * @param  array  $parameters
     * @return mixed
     *
     * @throws \BadMethodCallException
     */
    public function __call($method, $parameters)
    {
        if (preg_match('/get(.+)\b/i', $method, $matches)) {
            foreach ($this->claims as $claim) {
                if (get_class($claim) === 'Tymon\\JWTAuth\\Claims\\'.$matches[1]) {
                    return $claim->getValue();
                }
            }
        }

        throw new BadMethodCallException(sprintf('The claim [%s] does not exist on the payload.', Str::after($method, 'get')));
    }
}

View on GitHub (pinned to 6c70930a92)

When it happens

Trigger: Thrown at src/Payload.php:283 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tymondesigns/jwt-auth@6c70930a92 (2026-08-21). Data as JSON: /api/errors/d3122a9fe3b77e5d. Report an issue: GitHub.