{"record":{"id":"4f9c1393709950f5","repo":"BookStackApp/BookStack","slug":"exception-getmessage-4f9c13","errorCode":null,"errorMessage":"{$exception->getMessage()}","messagePattern":"\\{\\$exception->getMessage\\(\\)\\}","errorType":"exception","errorClass":"UserInviteException","httpStatus":null,"severity":"error","filePath":"app/Access/UserInviteService.php","lineNumber":26,"sourceCode":"class UserInviteService extends UserTokenService\n{\n    protected string $tokenTable = 'user_invites';\n    protected int $expiryTime = 336; // Two weeks\n\n    /**\n     * Send an invitation to a user to sign into BookStack\n     * Removes existing invitation tokens.\n     * @throws UserInviteException\n     */\n    public function sendInvitation(User $user)\n    {\n        $this->deleteByUser($user);\n        $token = $this->createTokenForUser($user);\n\n        try {\n            $user->notify(new UserInviteNotification($token));\n        } catch (\\Exception $exception) {\n            throw new UserInviteException($exception->getMessage(), $exception->getCode(), $exception);\n        }\n    }\n}\n","sourceCodeStart":8,"sourceCodeEnd":30,"githubUrl":"https://github.com/BookStackApp/BookStack/blob/18f8469a1c72f8cc8497e9372635e6dea5028071/app/Access/UserInviteService.php#L8-L30","documentation":"Generic sentinel rethrow in UserInviteService::sendInvitation: any exception raised while delivering the UserInviteNotification email (typically mail transport failure) is converted into a UserInviteException carrying the original message, so invite dispatch failures surface as a single user-facing error type.","triggerScenarios":"Thrown at app/Access/UserInviteService.php:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check mail server availability and SMTP credentials in .env (MAIL_HOST, MAIL_PORT, MAIL_USERNAME)","Verify network/DNS connectivity to the mail provider","Inspect the original exception message for transport-specific causes","Retry the invitation send once mail delivery is restored"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"18f8469a1c72f8cc8497e9372635e6dea5028071","analyzedAt":"2026-09-02T19:49:33.068Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}