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

fix(llm): triggering proper error on CLS mobile disconnection #7979

Conversation

fAnselmi-Ledger
Copy link
Contributor

@fAnselmi-Ledger fAnselmi-Ledger commented Oct 2, 2024

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

πŸ“ Description

  • Replaced error from action with state
  • Added a timeout to throw an error if connection with turned off device is attempted

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@fAnselmi-Ledger fAnselmi-Ledger requested review from a team as code owners October 2, 2024 14:16
Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
web-tools βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 21, 2024 0:23am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 0:23am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 0:23am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 0:23am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 21, 2024 0:23am

@live-github-bot live-github-bot bot added mobile Has changes in LLM common Has changes in live-common labels Oct 2, 2024
@fAnselmi-Ledger fAnselmi-Ledger force-pushed the LIVE-13084-LLM-Flex-Stax-Error-loading-too-long-when-user-power-off-his-Flex-during-CLS-uploading branch from eb8c1e7 to 63bb486 Compare October 2, 2024 14:27
timeout(5000),
catchError(err => {
if (err.name === "TimeoutError") {
return throwError(() => new DisconnectedDevice());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The throwError in operator is normally not necessary, look at here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jiyuzhuang! I wrote that to show disconnection error after 5 seconds of timeout

@@ -213,6 +212,14 @@ export default function loadImage({ deviceId, request }: Input): Observable<Load
sub.unsubscribe();
};
}),
).pipe(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ask] isn't it the purpose of the optional argument openTimeoutMs of withDevice ?

@fAnselmi-Ledger fAnselmi-Ledger force-pushed the LIVE-13084-LLM-Flex-Stax-Error-loading-too-long-when-user-power-off-his-Flex-during-CLS-uploading branch from 63bb486 to d2603b1 Compare October 15, 2024 15:26
@fAnselmi-Ledger fAnselmi-Ledger force-pushed the LIVE-13084-LLM-Flex-Stax-Error-loading-too-long-when-user-power-off-his-Flex-during-CLS-uploading branch from d2603b1 to b89d1e1 Compare October 21, 2024 10:09
@fAnselmi-Ledger fAnselmi-Ledger merged commit 4942541 into develop Oct 23, 2024
57 checks passed
@fAnselmi-Ledger fAnselmi-Ledger deleted the LIVE-13084-LLM-Flex-Stax-Error-loading-too-long-when-user-power-off-his-Flex-during-CLS-uploading branch October 23, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants