Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update help links #300

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/plug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class GlobalPlug implements Plug {
'The specified app ID and the auto-detected app ID are conflicting. '
+ 'There is no need to specify an app ID when using an application-specific tag. '
+ 'Please try again omitting the "appId" option. '
+ 'For help, see https://croct.help/sdk/js/conflicting-app-id',
+ 'For help, see https://croct.help/sdk/javascript/conflicting-app-id',

);
}
Expand All @@ -138,7 +138,7 @@ export class GlobalPlug implements Plug {
throw new Error(
'The app ID must be specified when it cannot be auto-detected. '
+ 'Please try again specifying the "appId" option.'
+ 'For help, see https://croct.help/sdk/js/missing-app-id',
+ 'For help, see https://croct.help/sdk/javascript/missing-app-id',
);
}

Expand Down Expand Up @@ -281,7 +281,7 @@ export class GlobalPlug implements Plug {

private get sdk(): SdkFacade {
if (this.instance === undefined) {
throw new Error('Croct is not plugged in. For help, see https://croct.help/sdk/js/not-plugged-in');
throw new Error('Croct is not plugged in. For help, see https://croct.help/sdk/javascript/not-plugged-in');
}

return this.instance;
Expand Down Expand Up @@ -317,7 +317,9 @@ export class GlobalPlug implements Plug {

public identify(userId: string): void {
if (typeof userId !== 'string') {
throw new Error('The user ID must be a string. For help, see https://croct.help/sdk/js/invalid-user-id');
throw new Error(
'The user ID must be a string. For help, see https://croct.help/sdk/javascript/invalid-user-id',
);
}

this.sdk.identify(userId);
Expand Down