fix(guardrails): stop pointing admins at the removed resource_app_id in the connect-time 503

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yucheng 2026-09-30 02:25:58 +00:00
parent 4236a43aa7
commit 1bddacfb68
2 changed files with 4 additions and 1 deletions

View file

@ -508,7 +508,7 @@ class Agent365Guardrail(CustomGuardrail):
return Unavailable(
detail=(
f"Entra rejected the gateway's own Agent 365 credentials ({error.misconfigured}); "
"check the guardrail's client_id, client_secret and resource_app_id"
"check the guardrail's client_id and client_secret"
),
fail_open=self.unreachable_fallback == "fail_open",
)

View file

@ -1280,6 +1280,9 @@ class TestPreflightCallerSignIn:
assert isinstance(verdict, Unavailable)
assert verdict.fail_open is False
assert "bad client_secret" in verdict.detail
assert "resource_app_id" not in verdict.detail, (
"the field was removed from the config; do not tell admins to check it"
)
@pytest.mark.asyncio
async def test_endpoint_unreachable_fail_open_is_unavailable(self):