feat: add structured action error codes for device actions#458
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
945a3c6 to
f8a8172
Compare
…e-customisation feat: Status message customisation
1a765e7 to
4df894f
Compare
|



About the Contributor
This pull request is posted on behalf of the BBC.
Type of Contribution
Feature
Current Behavior
When device actions fail (e.g. HTTP Send requests, CasparCG restarts), the
ActionExecutionResultonly contains a rawresponsestring with no structured information. Blueprint authors have no way to customise these messages.New Behavior
ActionExecutionResultgains optionalcodeandcontextfields for structured action errors, alongside the existingresponsefallback — fully backwards compatibleHttpSendActionErrorCode/HttpSendActionErrorMessages/HttpSendActionErrorContextMapadded to TSR typesCasparCGActionErrorCode/CasparCGActionErrorMessages/CasparCGActionErrorContextMapadded to TSR typesclearAllChannels,restartCasparCG,listMedia) actions updated to return structured errorsThis is the companion to PR #418 which covered device status errors — this PR covers device action execution failures.
Testing Instructions
Unit tests pass (
yarn test --testPathPatterns="casparcg").End-to-end: pair with sofie-core PR (stacked on #1604) which resolves these codes server-side using the blueprint
deviceActionMessagesfield. Trigger an HTTP Send action failure and verify the custom message appears in the UI.Other Information
Stacked on PR #418 (
feat: Status message customisation). The base branch for this PR isrjmunro/error-message-customisation.Status