issues icon indicating copy to clipboard operation
issues copied to clipboard

Drops Reward ID naming errors not surfaced

Open thedist opened this issue 1 year ago • 0 comments

Brief description When creating an Drops Reward and filling in the optional Reward ID field and clicking Save Reward it will throw an error in the console with a GQL response including the error custom_reward_id can only contain letters, numbers, periods, underscores, and dashes, but this error is in no way surfaced to users and the Save Reward button remains a loading spinner.

How to reproduce

  1. Go to an orgs console/drops-v3/rewards page
  2. Click "Create Reward"
  3. Fill in the details for a reward, and in the optional Reward ID field enter an invalid character, such as a colon :.
  4. Click Save Reward
  5. DevTools will show an error with the CreateQuestReward GQL request, including an error "code": "INVALID_ARGUMENT", "message": "custom_reward_id can only contain letters, numbers, periods, underscores, and dashes", but no errors are shown to the user.

Expected behaviour Following the steps to reproduce, I would expect client-side field validation preventing the Save Reward button from being pressed and there being text indicating the cause of the error.

Alternatively if the validity checking can't be done client-side and prevent the Save Reward button, instead the expected behaviour should be for the site to render the error that the GQL request has returned, and return the loading spinner back to a Save Reward button.

thedist avatar Jun 07 '24 15:06 thedist