Skip to content

feat: add structured action error codes for device actions#458

Closed
rjmunro wants to merge 4 commits into
Sofie-Automation:rjmunro/error-message-customisationfrom
bbc:rjmunro/improve-device-error-notifications
Closed

feat: add structured action error codes for device actions#458
rjmunro wants to merge 4 commits into
Sofie-Automation:rjmunro/error-message-customisationfrom
bbc:rjmunro/improve-device-error-notifications

Conversation

@rjmunro

@rjmunro rjmunro commented May 11, 2026

Copy link
Copy Markdown
Contributor

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 ActionExecutionResult only contains a raw response string with no structured information. Blueprint authors have no way to customise these messages.

New Behavior

  • ActionExecutionResult gains optional code and context fields for structured action errors, alongside the existing response fallback — fully backwards compatible
  • HttpSendActionErrorCode / HttpSendActionErrorMessages / HttpSendActionErrorContextMap added to TSR types
  • CasparCGActionErrorCode / CasparCGActionErrorMessages / CasparCGActionErrorContextMap added to TSR types
  • HTTP Send and CasparCG (clearAllChannels, restartCasparCG, listMedia) actions updated to return structured errors

This 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 deviceActionMessages field. 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 is rjmunro/error-message-customisation.

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 07273b41-f931-422c-8a1a-71f6e0cc094e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rjmunro rjmunro force-pushed the rjmunro/error-message-customisation branch from 945a3c6 to f8a8172 Compare May 12, 2026 08:15
…e-customisation

feat: Status message customisation
@rjmunro rjmunro marked this pull request as ready for review May 18, 2026 08:15
@rjmunro rjmunro force-pushed the rjmunro/improve-device-error-notifications branch from 1a765e7 to 4df894f Compare May 19, 2026 12:50
@sonarqubecloud

Copy link
Copy Markdown

@rjmunro rjmunro deleted the branch Sofie-Automation:rjmunro/error-message-customisation May 19, 2026 12:51
@rjmunro rjmunro closed this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant