Skip to content

Functions v4 client: terminal/invalid-state control-plane ops surface opaque 2 UNKNOWN (HTTP 400) instead of a meaningful status #315

Description

@YunchuWang

Summary

A Durable Functions v4 (durable-functions@0.4.x, gRPC-core) client calling a control-plane op (terminate/suspend/resume) on an instance in a terminal state (Completed/Failed/Terminated) currently gets an opaque 2 UNKNOWN: Exception was thrown by handler, which the compat turns into HTTP 400. v3 (extension-HTTP path) instead swallowed terminal-instance ops -> HTTP 200 (no-op).

Evidence (E2E run-2)

Problems

  1. Server-side: the extension's gRPC endpoint maps a wrong-state InvalidOperationException to opaque 2 UNKNOWN, losing the reason. Ideally return a meaningful status (e.g. FAILED_PRECONDITION) with detail — benefits ALL language SDKs.
  2. Client-side (compat): without server detail, v4 can't distinguish terminal from other states without an extra getStatus round-trip; the current bare 400 is not ideal (should distinguish 404 nonexistent from a terminal/conflict status, and not be a plain 400).

Proposed direction (needs decision)

Scope

3 e2e specs skipped in #282 pending this: suspend-completed, terminate-completed, terminate-terminated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions