Return errors from "description.NewServer" and "fsm.apply"

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Error Handling, SDAM
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The description.NewServer and fsm.apply functions create or modify server descriptions. Both of those functions set any errors that happen on the returned or modified description.Server struct instead of returning it as part of the function signature. That deviates from typical Go function signatures and can lead to bugs if someone doesn't realize they need to check the LastError field on the returned struct. Update both functions to return errors as well as set the error in the LastError field. Update calling code to check the returned error instead of the error on the description.Server

      Definition of done:

      • Update description.NewServer and fsm.apply to return an error.
      • Update all calling code to check the returned error instead of the description.Server.LastError field.

              Assignee:
              Unassigned
              Reporter:
              Matt Dale
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: