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

🐞 Misleading error message when times are filled in as a string #393

Open
1 task done
Izerous opened this issue Jul 5, 2024 · 0 comments
Open
1 task done

🐞 Misleading error message when times are filled in as a string #393

Izerous opened this issue Jul 5, 2024 · 0 comments
Assignees
Labels
bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on.

Comments

@Izerous
Copy link

Izerous commented Jul 5, 2024

What happened?

Moved timeout and promptBeforeIdle to environment variables after having it working and values were getting injected as strings instead of numbers. Very much my fault and an easy fix however the reported error message in the console is misleading to the actual error that is happening. It reports prompt must be larger than timeout.

I would have expected

  • The error to report that a non-numeric value had been received "Timeout must be an interger", "promptBeforeIdle must be an integer" etc
    or
  • The library to do a parseInt or similar internally and convert the strings to numbers or throw an error on a failed conversion

Reproduction Steps

1. Set timeout to "1000000" (string not number)
2. Set prompt to "10000" (string not number)
3. Run

Relevant log output

The value for the promptBeforeIdle property must be less than the timeout property 1000000

Screenshots or Additional Context

No response

Module Version

5.7.2

What browsers are you seeing the problem on? Select all that apply.

Chrome

What devices are you seeing the problem on?

Desktop

Verification

  • I have checked for existing closed issues and discussions.
@Izerous Izerous added bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on. labels Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on.
Projects
None yet
Development

No branches or pull requests

2 participants