Skip to content

Conversation

@n-o-u-r-h-a-n
Copy link

Context

SAP/cloud-sdk-java-backlog#ISSUENUMBER.

Removed the following warning log in response to Backlog Item no.295 in AI SDK : Credential type not found or not recognised in service binding.

Feature scope:

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Documentation updated
  • Release notes updated

@newtork newtork added please merge Request to merge a pull request please review Request to review a pull request labels Oct 27, 2025
.warn(
"Credential type not found or not recognised in service binding. Defaulting to BINDING_SECRET."))
.getOrElse(CredentialType.BINDING_SECRET);
return getOAuthCredential(CredentialType.class, "credential-type").getOrElse(CredentialType.BINDING_SECRET);
Copy link
Contributor

Choose a reason for hiding this comment

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

(Major)
Can we keep the message? It sounds important to me.
Also shouldn't the AI Core credential actually contain "credential-type"? How is this warn message harming anyone (legitimally)?

Copy link
Member

@Jonas-Isr Jonas-Isr Oct 28, 2025

Choose a reason for hiding this comment

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

I think it would be ideal to have this message once (i.e., the first time this code is invoked) but not with each and every call because then it really clogs up the logs.

We are trying to fix the problem we saw in the demo in the AI SDK.

Copy link
Contributor

@newtork newtork Oct 28, 2025

Choose a reason for hiding this comment

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

For the protocol, we've found the service-key may or may not contain credential-type in the JSON payload.

But for normal use-cases for classic service-bindings, we want to see WARN messages when important fields are mising.

@newtork
Copy link
Contributor

newtork commented Oct 28, 2025

Closed in favor of SAP/ai-sdk-java#636

@newtork newtork closed this Oct 28, 2025
@CharlesDuboisSAP CharlesDuboisSAP deleted the Improving-Logging branch October 28, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

please merge Request to merge a pull request please review Request to review a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants