Skip to content

[Bug] add client side validation in payment connector #1564

@notgitika

Description

@notgitika

Description

I entered the wrong payment connector secret key format which allowed me to "add" the payment connector (even showed me the green tick validaiton in TUI) but then deploy failed.

Add better client side validation in this case.

Steps to Reproduce

  1. be in the TUI
  2. agentcore add payment-manager
  3. agentcore add payment-connector
  4. then just type in random values for payment connector fields
  5. hit agentcore deploy, which errors out with message
[done]    Validate project
  [done]    Check dependencies
  [done]    Build CDK project
  [error]   Creating payment infrastructure
            → Payment setup failed: Credential provider for "MyCdpConnector": Failed to create payment credential provider "MyPaymentManager-MyCdpConnector-cdp": Payment API error (400):
  {"fieldList":null,"message":"Invalid apiKeySecret format: Expected base64-encoded Ed25519 private key","reason":null}

Expected Behavior

it should catch the client side validation earlier during the add step instead of deploy

Actual Behavior

it errors out during deploy

CLI Version

0.20.0

Operating System

macOS

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions