Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4696

SaveOrder method should throw more meaningful exceptions

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.1.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      In the new Order Entry API, the Order Service API method provides several validation checks--for example, not allowing two active orders for the same orderable and care setting, cannot edit an existing order, etc...

      However, in each case a standard OpenMRS API exception is thrown, with the error message hard-coded in English text.

      In order to allow consumers of this API to take custom actions on an error, such as displaying a localized error message, the API should throw new, targeted exceptions such as "DuplicateActiveOrder" that extend APIException.

      Burke Mamlin Darius Jazayeri [X] Thoughts?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sashu2014 Sam Shuster [X] (Inactive)
              Reporter:
              mogoodrich Mark Goodrich
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: