Skip to content

POST /api/workflow accepts externalInputPayloadStoragePath without validating storage is configured; should return 400 instead of 500 #1587

Description

@nickorkes

Summary

  • POST /api/workflow accepts the externalInputPayloadStoragePath field unconditionally
  • No validation that external payload storage is actually configured.
  • On a server with no storage backend, start workflow fails with an internal-error 500 where an upfront 400 with a clear message is more appropriate

Environment

  • conductor-oss/conductor v3.32.1, standalone container (conductoross/conductor:3.32.1)
  • No external payload storage configured
    • conductor.external-payload-storage.type is unset

Steps to reproduce

Register any minimal workflow:

curl -X PUT http://localhost:8080/api/metadata/workflow \
  -H 'Content-Type: application/json' \
  -d '[{"name":"payload_path_repro","version":1,"schemaVersion":2,
       "ownerEmail":"you@example.com","timeoutSeconds":0,
       "tasks":[{"name":"echo","taskReferenceName":"echo_ref","type":"JSON_JQ_TRANSFORM",
                 "inputParameters":{"in":"${workflow.input}","queryExpression":"{got: .in}"}}]}]'

Start it with the storage-path field

curl -X POST http://localhost:8080/api/workflow \
  -H 'Content-Type: application/json' \
  -d '{"name":"payload_path_repro","version":1,
       "externalInputPayloadStoragePath":"workflow/input/nonexistent.json"}'

Actual output

{"status":500,"message":"Unable to download payload from external storage path: workflow/input/nonexistent.json","instance":"f6c8fce328b5","retryable":false}
HTTP 500

Expected

A 400 rejection at the request instead of a server-side erro, something like external payload storage is not configured on this server.

Root cause

Proposed fix

Validate at the API boundary (or at least in startWorkflow)

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

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions