Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding batch requests via Twirp? 207 Multi-Status support in error spec? #400

Open
Lupus opened this issue Sep 9, 2024 · 0 comments
Open

Comments

@Lupus
Copy link

Lupus commented Sep 9, 2024

Hello! What's the best way to introduce batched request handlers to the Twirp IDL? The request can just be an additional message that wraps other request(s) in a repeated field obviously, but how to encode response? Some operations might fail independently from others which might succeed. If we consider this as a Twirp error, it should have separate HTTP code, probably 207 Multi-Status, with some well-defined JSON representation for a list of successful results/errors, but currently 207 code is not considered a Twirp error code according to the spec. Other option is to encode is as a successful response and distinguish the semantics between successful and failed responses via protobuf types.

Has anyone stumbled upon such dilemma already?

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

No branches or pull requests

1 participant