fix(auth): address PR #757 review feedback
- Branch the ProvisioningRequiredError message on the elicit result so a user who acknowledged the prompt isn't told to call nc_auth_provision_access (which would loop an LLM that just confirmed via elicitation). Other paths keep the existing instruction. - Convert present_login_url's f-string logger.warning to lazy %s, matching present_provisioning_required and the repo's lazy-logging preference. - Add a test for NEXTCLOUD_PUBLIC_ISSUER_URL trailing-slash normalization. - Strengthen the decorator-elicits test: split into the "accepted" and "message_only" branches so the error-message change is regression-tested. Refs: cbcoutinho/nextcloud-mcp-server#757#issuecomment-4363552487 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
da60322597
commit
822a8fe2ed
@@ -115,8 +115,9 @@ async def present_login_url(
|
||||
return "message_only"
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"Elicitation failed unexpectedly ({type(e).__name__}: {e}), "
|
||||
"falling back to message"
|
||||
"Elicitation failed unexpectedly (%s: %s), falling back to message",
|
||||
type(e).__name__,
|
||||
e,
|
||||
)
|
||||
return "message_only"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user