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

Error "expectedAmount must be a positive integer" is confusing when creating a request #1312

Open
2 tasks
MantisClone opened this issue Jan 4, 2024 · 0 comments

Comments

@MantisClone
Copy link
Member

MantisClone commented Jan 4, 2024

Problem

When creating a request, the expectedAmount property can be expressed as a number OR string. However, when expressed as a number, it cannot exceed 2^53 - 1 (9,007,199,254,740,991) which would result in a loss of precision. In this case, it throws the error "expectedAmount must be a positive integer".

When this error message occurs, the best solution is to express the expectedAmount as a string.

The error message doesn't make this solution clear.

Solution

  • Change the error message (in all the places where it occurs) to better explain the solution.
  • Update the docs to better explain this.
@MantisClone MantisClone moved this from 🆕 New to 🐞 Backlog: Bug / Tech Debt in Request Network Tech Backlog Mar 6, 2024
@MantisClone MantisClone moved this from 🐞🧹 Backlog: Bug, Tech Debt, or Chore to 🎫 Backlog in Request Network Tech Backlog Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎫 Backlog
Development

No branches or pull requests

1 participant