{"record":{"id":"663554cde4b658ce","repo":"yiisoft/yii2","slug":"your-request-was-made-with-invalid-credentials","errorCode":null,"errorMessage":"Your request was made with invalid credentials.","messagePattern":"Your request was made with invalid credentials\\.","errorType":"http","errorClass":"UnauthorizedHttpException","httpStatus":401,"severity":"error","filePath":"framework/filters/auth/AuthMethod.php","lineNumber":98,"sourceCode":"        $this->challenge($response);\n        $this->handleFailure($response);\n\n        return false;\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function challenge($response)\n    {\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function handleFailure($response)\n    {\n        throw new UnauthorizedHttpException('Your request was made with invalid credentials.');\n    }\n\n    /**\n     * Checks, whether authentication is optional for the given action.\n     *\n     * @param Action $action action to be checked.\n     * @return bool whether authentication is optional or not.\n     * @see optional\n     * @since 2.0.7\n     */\n    protected function isOptional($action)\n    {\n        $id = $this->getActionId($action);\n        foreach ($this->optional as $pattern) {\n            if (StringHelper::matchWildcard($pattern, $id)) {\n                return true;\n            }\n        }","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/filters/auth/AuthMethod.php#L80-L116","documentation":"Error \"Your request was made with invalid credentials.\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/filters/auth/AuthMethod.php:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}