Skip to content

Commit

Permalink
Add troubleshooting links (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos authored Aug 11, 2024
1 parent aed496d commit ae589b9
Show file tree
Hide file tree
Showing 26 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion preview/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const config: PlaywrightTestConfig = {
timeout: 5000,

toHaveScreenshot: {
maxDiffPixelRatio: 0.01,
maxDiffPixelRatio: 0.02,
},
},
/* Run test in files in parallel */
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/test/widget.spec.ts-snapshots/widget-expanded-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/test/widget.spec.ts-snapshots/widget-minimized-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/test/widget.spec.ts-snapshots/widget-truncated-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/test/widget.spec.ts-snapshots/widget-truncated-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/plug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export class GlobalPlug implements Plug {
throw new Error(
'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.',
+ 'Please try again omitting the "appId" option. '
+ 'Read more on https://croct.help/sdk/js/conflicting-app-id',

);
}

Expand All @@ -146,7 +148,8 @@ export class GlobalPlug implements Plug {
if (appId === null) {
throw new Error(
'The app ID must be specified when it cannot be auto-detected. '
+ 'Please try again specifying the "appId" option.',
+ 'Please try again specifying the "appId" option.'
+ 'Read more on https://croct.help/sdk/js/missing-app-id',
);
}

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

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

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

public identify(userId: string): void {
if (typeof userId !== 'string') {
throw new Error('The user ID must be a string. Read more on https://croct.help/plug-js/id-conversion');
throw new Error('The user ID must be a string. Read more on https://croct.help/sdk/js/invalid-user-id');
}

this.sdk.identify(userId);
Expand Down

0 comments on commit ae589b9

Please sign in to comment.