Skip to content

Commit d84b29f

Browse files
committed
Improve callback invite URL error message
1 parent fcda139 commit d84b29f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/stack/src/lib/stack-app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ class _StackClientAppImpl<HasTokenStore extends boolean, ProjectId extends strin
755755
clientReadOnlyMetadata: crud.client_read_only_metadata,
756756
async inviteUser(options: { email: string, callbackUrl?: string }) {
757757
if (!options.callbackUrl && typeof window === "undefined") {
758-
throw new Error("Cannot invite user without a callback URL when calling the inviteUser function on the server.");
758+
throw new Error("Cannot invite user without a callback URL from the server. Make sure you pass the `callbackUrl` option: `inviteUser({ email, callbackUrl: ... })`");
759759
}
760760
await app._interface.sendTeamInvitation({
761761
teamId: crud.id,
@@ -1964,7 +1964,7 @@ class _StackServerAppImpl<HasTokenStore extends boolean, ProjectId extends strin
19641964
},
19651965
async inviteUser(options: { email: string, callbackUrl?: string }) {
19661966
if (!options.callbackUrl && typeof window === "undefined") {
1967-
throw new Error("Cannot invite user without a callback URL when calling the inviteUser function on the server.");
1967+
throw new Error("Cannot invite user without a callback URL from the server. Make sure you pass the `callbackUrl` option: `inviteUser({ email, callbackUrl: ... })`");
19681968
}
19691969

19701970
await app._interface.sendTeamInvitation({

0 commit comments

Comments
 (0)