Skip to content

Stop powering up when encountering channel error

Cyril Danilevski requested to merge feat/channel_error into main

Description

This MR adds channels error checks. All channel errors are read and reported as a single value. If any error occurs, the power ON procedure will get aborted (channels already stay on, further channels are not touched).
Power down will continue to power OFF remaining channels.

The HTTP routes were updated to reflect possible errors: failures are reported in the resulting JSON, and HTTP codes can be verified (406 when some issue arise).

How Has This Been Tested?

This was tested by interlocking some channels and trying to power them up, leading to an error. The procedure was successfully aborted, and returned the expected error code, as well has reporting the error in the output JSON.

Relevant Documents (optional)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Docs (changes to the documentation)
  • Style (formatting changes only, no code changes)
  • Refactor (refactoring code with no functionality changes)
  • Test (additional or refactored tests)
  • Chore (non-code changes, e.g. comments, readme, grammar, etc...)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I added tests where appropriate.

Reviewers

  • I need a review from:
  • I have asked Controls for review

Merge request reports

Loading