Skip to content

fix(config): use provider type in unsupported provider error messages#6937

Open
kunal-yelgate wants to merge 2 commits into
pipe-cd:masterfrom
kunal-yelgate:fix/type-unsupported
Open

fix(config): use provider type in unsupported provider error messages#6937
kunal-yelgate wants to merge 2 commits into
pipe-cd:masterfrom
kunal-yelgate:fix/type-unsupported

Conversation

@kunal-yelgate

Copy link
Copy Markdown

What this PR does:

Fixes incorrect error messages in PipedPlatformProvider.MarshalJSON() and PipedAnalysisProvider.MarshalJSON() by reporting the unsupported provider Type instead of the provider Name when an invalid provider type is encountered.

Why we need it:

The current error messages can be misleading because they display the provider name rather than the actual invalid type value. This makes configuration issues harder to diagnose and debug. Reporting the unsupported type provides more accurate and actionable feedback to users.

Which issue(s) this PR fixes:

Fixes #6931

Does this PR introduce a user-facing change?:

  • How are users affected by this change:

    • Error messages for unsupported platform and analysis provider types now correctly display the invalid provider type value.

    • Example:

      • Before: unsupported platform provider type: my-provider
      • After: unsupported platform provider type: UNKNOWN_TYPE
  • Is this breaking change:

    • No.
  • How to migrate (if breaking change):

    • Not applicable.

@kunal-yelgate kunal-yelgate requested a review from a team as a code owner June 24, 2026 12:19
Signed-off-by: kunal_yelgate <kunalyelgatew@gmail.com>
@kunal-yelgate kunal-yelgate force-pushed the fix/type-unsupported branch from 1aed7e3 to 3691e5a Compare June 24, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pkg/config): use provider type instead of name in unsupported type error messages

1 participant