Non-numerical values (ex.: using commas) trigger snail when setting up payment and shipping method Calculator #7841
Labels
bug-s3
The bug is stopping a critical or non-critical feature but there is a usable workaround.
Description
The Calculator section, when setting up payment or shipping methods, can easily break the app displaying a visible snail to the user, if non-numerical values are typed. Some examples are shown on the pic below.
It should be noted that currently, most of the backoffice of the app does not take commas as decimal separators. So, setting a Flat Rate per Order of 2,5 will trigger the error, ex:
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/60d5d1b3c0835200099efcf3?event_id=60d5d1b3007f61c7fb470000&i=sk&m=nw
This relates the "commas as decimal separators" discussion, and as such PRs #7758 and #7719.
Expected Behavior
If an invalid input is added, clicking
Update
should warn the user so the input can be corrected; it should not cause an error 500.Update
PR #8144 introduces an informative banner to the user: it is expected that this banner is displayed when non-numerical values are introduced.
Actual Behaviour
If an invalid input is added, clicking
Update
causes an error 500 and displays the snail to the user.Steps to Reproduce
As an Admin:
Animated Gif/Screenshot
Some examples of "invalid" inputs:
Workaround
Navigate back from the snail and type a valid input.
Severity
bug-s3: a feature is broken but there is a workaround
Your Environment
Possible Fix
The text was updated successfully, but these errors were encountered: