File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
shell/agents/Microsoft.Azure.Agent Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ namespace Microsoft.Azure.Agent;
1111
1212internal class ChatSession : IDisposable
1313{
14- private const string ACCESS_URL = "https://copilotweb.production.portalrp.azure.com/api/access?api-version=2024-09-01" ;
14+ // TODO: production URL not yet working for some regions.
15+ // private const string ACCESS_URL = "https://copilotweb.production.portalrp.azure.com/api/access?api-version=2024-09-01";
16+ private const string ACCESS_URL = "https://copilotweb.canary.production.portalrp.azure.com/api/access?api-version=2024-09-01" ;
17+
1518 private const string DL_TOKEN_URL = "https://copilotweb.production.portalrp.azure.com/api/conversations/start?api-version=2024-11-15" ;
1619 private const string CONVERSATION_URL = "https://directline.botframework.com/v3/directline/conversations" ;
1720
Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ internal async static Task EnsureSuccessStatusCodeForTokenRequest(this HttpRespo
4040 if ( ! response . IsSuccessStatusCode )
4141 {
4242 string responseText = await response . Content . ReadAsStringAsync ( CancellationToken . None ) ;
43- string message = $ "{ errorMessage } HTTP status: { response . StatusCode } , Response: { responseText } ";
43+ if ( string . IsNullOrEmpty ( responseText ) )
44+ {
45+ responseText = "<empty>" ;
46+ }
47+
48+ string message = $ "{ errorMessage } HTTP status: { response . StatusCode } , Response: { responseText } .";
4449 Telemetry . Trace ( AzTrace . Exception ( message ) ) ;
4550 throw new TokenRequestException ( message ) ;
4651 }
You can’t perform that action at this time.
0 commit comments