Skip to content

Commit

Permalink
Merge pull request #401 from wishyoudie/master
Browse files Browse the repository at this point in the history
chore(sdk): change retrieveLaunchParams error message to more clear
  • Loading branch information
heyqbnk authored Jul 10, 2024
2 parents 6f38407 + 2dbbd42 commit 2bd8cbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/silent-toys-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@telegram-apps/sdk": patch
---

Make retrieveLaunchParams error message clearer, add link to docs
2 changes: 1 addition & 1 deletion packages/sdk/src/launch-params/retrieveLaunchParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export function retrieveLaunchParams(): LaunchParams {
}
}

throw new Error('Unable to retrieve launch parameters from any known source.');
throw new Error('Unable to retrieve launch parameters from any known source. Perhaps, you have opened your app outside of Telegram?\n\n📖 Refer to docs for more information:\nhttps://docs.telegram-mini-apps.com/packages/telegram-apps-sdk/environment');
}

0 comments on commit 2bd8cbd

Please sign in to comment.