Skip to content

expect runtime error from taurus #198

Merged
raphael-goetz merged 7 commits intomainfrom
#196-expect-runtime-error
Apr 13, 2026
Merged

expect runtime error from taurus #198
raphael-goetz merged 7 commits intomainfrom
#196-expect-runtime-error

Conversation

@raphael-goetz
Copy link
Copy Markdown
Member

Resolves: #196 & #197

Copilot AI review requested due to automatic review settings April 13, 2026 17:38
@raphael-goetz raphael-goetz linked an issue Apr 13, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the REST adapter to stop assuming request bodies are protobuf-encoded Values and instead parse/encode bodies based on Content-Type, while also improving handling of non-HTTP “RuntimeError” results coming back from Taurus.

Changes:

  • Parse incoming request bodies as JSON or text based on Content-Type (with a fallback path for missing Content-Type).
  • Build a structured flow input containing request headers and optional payload, and detect/translate Taurus RuntimeError results to HTTP errors.
  • Add helpers for mapping tucana::shared::Value results into hyper::Responses, including response-body encoding by Content-Type.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
crates/base/src/store.rs Clones and debug-logs flow input around execution requests.
adapter/rest/src/main.rs Switches request-body handling to Content-Type parsing; wraps request headers/payload into input Value; adds RuntimeError detection; uses new response helpers.
adapter/rest/src/content_type.rs New module to parse/encode bodies by Content-Type with unit tests.
adapter/rest/src/response.rs New module to convert flow result Value into an HTTP response (status/headers/body).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adapter/rest/src/response.rs
Comment thread adapter/rest/src/response.rs
Comment thread adapter/rest/src/response.rs
Comment thread crates/base/src/store.rs
Comment thread adapter/rest/src/main.rs
Comment thread adapter/rest/src/content_type.rs
Comment thread adapter/rest/src/main.rs
@raphael-goetz raphael-goetz merged commit 7b3e96d into main Apr 13, 2026
4 checks passed
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.

Failed to decode request body as protobuf Value Expect RuntimeErrors from Taurus

2 participants