Skip to content

Output Configuration v1.13.0

Reference for all output fields in stub configuration.

Fields

FieldTypeDescription
dataobjectResponse payload for successful requests
streamarrayServer streaming messages
errorstringError message
codeintgRPC status code
headersobjectResponse metadata
delaydurationResponse delay
detailsarrayError details (gRPC status details)

data — Success Response v1.13.0

yaml
output:
  data:
    message: "Hello World"
    status: "success"

stream — Server Streaming v3.3.0

yaml
output:
  stream:
    - message: "First"
    - message: "Second"

See Streaming for full streaming guide.

error + code — Error Response v2.0.0

yaml
output:
  error: "Not found"
  code: 5  # NOT_FOUND

gRPC Status Codes

CodeNameDescription
0OKSuccess
1CANCELEDCancelled
3INVALID_ARGUMENTInvalid input
4DEADLINE_EXCEEDEDTimeout
5NOT_FOUNDResource missing
7PERMISSION_DENIEDAccess denied
8RESOURCE_EXHAUSTEDQuota exceeded
13INTERNALServer error
14UNAVAILABLEService unavailable

headers — Response Metadata v2.1.0

yaml
output:
  headers:
    "x-request-id": "req-123"
    "x-cache-control": "no-cache"
  data:
    result: "ok"

delay — Response Delay v3.2.16

yaml
output:
  delay: 100ms
  data:
    message: "Delayed"

Formats: 100ms, 1s, 500ms, 2.5s

details — Error Details v3.8.0

yaml
output:
  error: "Validation failed"
  code: 3
  details:
    - type: "type.googleapis.com/google.rpc.ErrorInfo"
      reason: "API_DISABLED"
      domain: "example.service.local"
      metadata:
        service: "example.service.local"

Encoded as google.protobuf.Any in gRPC status details.

Stream + Error

yaml
output:
  stream:
    - message: "Starting"
    - message: "Done"
  error: "Completed with warnings"
  code: 2  # UNKNOWN

All stream messages are sent before the error terminates the RPC.