Skip to content

Commit 875ac5b

Browse files
committed
fix: default auth to empty object when auth_type is set
The Hookdeck API requires config.auth when auth_type is set. For auth types like HOOKDECK_SIGNATURE that need no config, default to an empty object instead of omitting auth entirely.
1 parent 13d1fb2 commit 875ac5b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/deploy/deploy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ func buildDestinationRequest(dst *manifest.DestinationConfig) *UpsertDestination
264264
}
265265
if dst.Auth != nil {
266266
config["auth"] = dst.Auth
267+
} else if dst.AuthType != "" {
268+
// The Hookdeck API requires config.auth when auth_type is set.
269+
// Default to empty object for auth types like HOOKDECK_SIGNATURE.
270+
config["auth"] = map[string]interface{}{}
267271
}
268272
if dst.RateLimit != 0 {
269273
config["rate_limit"] = dst.RateLimit

0 commit comments

Comments
 (0)