Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider secret special chars #53

Merged
merged 8 commits into from
Dec 18, 2024

Conversation

MarlenKoch
Copy link
Contributor

Problem:

When the provider secret contains a special char (like "), the error message is the following:
cannot create new Service: failed to get BTP accounts service client.: invalid character '9' after object key:value pair

https://github.com/SAP/crossplane-provider-btp/blob/main/btp/cisclient.go#L236-L254

Solution:

This PR introduces a special error message in case the user credentials json can't be parsed.

Since there are two different secrets, one of which already had a more specific error message, I added the new error message to the user credentials (and not the cis-provider-secret).

Copy link
Member

@sdischer-sap sdischer-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor addition required. Other then that looks really good. Nice work!

internal/clients/tfclient/tfclient.go Show resolved Hide resolved
Copy link
Member

@sdischer-sap sdischer-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you!

Copy link
Member

@maximiliantech maximiliantech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! 🚀

@maximiliantech maximiliantech merged commit fade096 into SAP:main Dec 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants