Skip to content

feat: allow returning error from adlib actions in blueprints#1638

Open
anteeek wants to merge 5 commits intoSofie-Automation:mainfrom
bbc:feat/SOFIE-318
Open

feat: allow returning error from adlib actions in blueprints#1638
anteeek wants to merge 5 commits intoSofie-Automation:mainfrom
bbc:feat/SOFIE-318

Conversation

@anteeek
Copy link
Copy Markdown
Contributor

@anteeek anteeek commented Feb 6, 2026

About the Contributor

This PR is made on behalf of the BBC

Type of Contribution

This is a:

Feature

Current Behavior

Currently, there's no way to return a meaningful error message (other than just 500 - failed) from running an adlib action

New Behavior

This PR builds upon #1643 to allow an adlib-action to return a more generic form of error that will be propagated to callers.

image image

This does break the api from #1643, but it loosens the api to allow for any 4xx failure reason to be given, instead of just 'validation failed'.
Note that in this example screenshot, my blueprints have assigned a stack trace to details, that field is a user owned json blob and could contain any additional details needed

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

Blueprints integration

Time Frame

Other Information

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
Copy link
Copy Markdown

coderabbitai bot commented Feb 6, 2026

Warning

Rate limit exceeded

@Julusian has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 16 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 16 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 63a12943-3884-43bf-aec9-826447cf8cc5

📥 Commits

Reviewing files that changed from the base of the PR and between aace1e5 and 80d7eee.

📒 Files selected for processing (6)
  • meteor/server/api/rest/v1/playlists.ts
  • packages/blueprints-integration/src/api/showStyle.ts
  • packages/corelib/src/__tests__/lib.spec.ts
  • packages/corelib/src/error.ts
  • packages/corelib/src/worker/studio.ts
  • packages/job-worker/src/playout/adlibAction.ts
✨ 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.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/job-worker/src/playout/adlibAction.ts 55.55% 4 Missing ⚠️
meteor/server/api/rest/v1/playlists.ts 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Saftret Saftret added the Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) label Feb 9, 2026
@PeterC89
Copy link
Copy Markdown
Contributor

@anteeek might be worth merging #1643 into this and updating as needed?

@Julusian Julusian marked this pull request as ready for review April 14, 2026 14:37
@imaretic imaretic self-assigned this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from BBC Contributions sponsored by BBC (bbc.co.uk)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants