{"record":{"id":"d5ed78885abd5b9a","repo":"filamentphp/filament","slug":"an-authorization-was-denied-without-a-message","errorCode":null,"errorMessage":"An authorization was denied without a message.","messagePattern":"An authorization was denied without a message\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/actions/src/Concerns/CanBeAuthorized.php","lineNumber":177,"sourceCode":"\n    public function getAuthorizationResponseWithMessage(): Response\n    {\n        $response = $this->getAuthorizationResponse();\n\n        if ($response->allowed()) {\n            return $response;\n        }\n\n        $message = $this->getAuthorizationMessage();\n\n        if (filled($message)) {\n            invade($response)->message = $message; /** @phpstan-ignore-line */\n\n            return $response;\n        }\n\n        if (blank($response->message())) {\n            throw new LogicException('An authorization was denied without a message.');\n        }\n\n        return $response;\n    }\n\n    public function authorizationMessage(string | Closure | null $message): static\n    {\n        $this->authorizationMessage = $message;\n\n        return $this;\n    }\n\n    public function getAuthorizationMessage(): ?string\n    {\n        return $this->evaluate($this->authorizationMessage);\n    }\n\n    public function authorizationTooltip(bool | Closure $condition = true): static","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/actions/src/Concerns/CanBeAuthorized.php#L159-L195","documentation":"Error \"An authorization was denied without a message.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/actions/src/Concerns/CanBeAuthorized.php:177 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":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}