serenity-health / roadmap

Public roadmap for development of Serenity's apps reported by our community of users
0 stars 1 forks source link

bugfix/display error messages on healthcare service CRUD operations #5

Open chris-dare opened 2 years ago

chris-dare commented 2 years ago

Describe the bug I'm trying to add additional service tier for Haematologist but the feedback I keep getting is 'cannot read property code of undefined' Please assist Urgently. Thanks 👍

To Reproduce Steps to reproduce the behavior:

  1. Switch to admin workspace
  2. Select a service to update and edit it
  3. Add a new price tier with invalid info e.g. priority left blank or price of a negative value
  4. You'll notice that it gives the error reported

Expected behavior App should display the particular error so that a user can take the necessary action. So instead of 'cannot read property code of undefined' we should have something more meaningful like Price tier priority cannot be empty or Price is invalid!

Screenshots/Screencast N/A

Desktop (please complete the following information):

Additional context N/A

seddie62 commented 2 years ago

This is a sample response I'm getting from the API

Screenshot 2022-01-05 at 9 24 40 AM
chris-dare commented 2 years ago

Thanks a lot @seddie62. I'll expose the data in errors to the message field as well. In the meantime, let's proceed with the integration. Also, please make the priority a required field for price tiers

chris-dare commented 2 years ago

Error messages not descriptive. Couldn't see error for duplicate order code. Needs to be handled effectively on the API