axheron / ffxiv-dps-calc

A Final Fantasy XIV DPS simulator for comparing gear sets
https://dpscalc.xivresources.com
GNU Affero General Public License v3.0
2 stars 4 forks source link

blank fields in rotation picker leads to 500 #113

Open ackao opened 3 years ago

ackao commented 3 years ago

Describe the bug leaving a field blank in the rotation picker (by deleting a number) causes backend to typeerror and return 500

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dpscalc.xivresources.com/
  2. Click on edit icon next to rotation
  3. delete any number
  4. hit ok
  5. kaboom

Expected behavior no kaboom, mp/min stats are updated correctly in the table

Screenshots image

Desktop (please complete the following information):

Additional context did not test for what happens if stats fields in table are blanked out but i feel suspicious about that too

redshadowhero commented 3 years ago

I think we might be able to do better here

redshadowhero commented 3 years ago

After some internal discussion, I think that this package will be good for server-side schema enforcement.

How do we want to tackle this in the client?

axheron commented 3 years ago

It depends how it's managed. I think either making the fields in the type mandatory or otherwise state are both fine, former is likely better.