Clean up how we throw errors in async functions

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.0.5
    • Component/s: Native, Operations Layer
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      We have inconsistent behavior in how we handle errors in asynchronous functions.

      Ideally, we should have the following behavior:

      • Any error that occurs outside of an executeOperation call should be thrown, as we are still in synchronous boilerplate. This makes handling simple validation errors easier.
      • Any errors that occur within an executeOperation call should be passed into the callback (and by extension either call a callback with an error or reject the promise).

      We currently have behavior all over the place. Some examples:

      We should have a consistent approach to this sort of stuff.

              Assignee:
              Unassigned
              Reporter:
              Daniel Aprahamian (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: