@@ -305,16 +305,29 @@ public async Task<bool> CheckForUpdateAsync(string orchestratorId)
305305 {
306306 if ( ! await EnsureAuthenticatedAsync ( ) )
307307 {
308+ _logger . LogWarning ( "Cannot check for update: Not authenticated" ) ;
308309 return false ;
309310 }
310311
311- var response = await _httpClient . GetAsync ( $ "/api/orchestrators/{ Uri . EscapeDataString ( orchestratorId ) } /update-status") ;
312+ var url = $ "/api/orchestrators/{ Uri . EscapeDataString ( orchestratorId ) } /update-status";
313+ _logger . LogDebug ( "Checking update status at: {Url}" , url ) ;
314+
315+ var response = await _httpClient . GetAsync ( url ) ;
316+ _logger . LogDebug ( "Update status response: {StatusCode}" , response . StatusCode ) ;
312317
313318 if ( response . IsSuccessStatusCode )
314319 {
320+ var content = await response . Content . ReadAsStringAsync ( ) ;
321+ _logger . LogDebug ( "Update status response body: {Content}" , content ) ;
322+
315323 var result = await response . Content . ReadFromJsonAsync < UpdateStatusResponse > ( _jsonOptions ) ;
324+ _logger . LogDebug ( "Parsed pendingUpdate value: {PendingUpdate}" , result ? . PendingUpdate ) ;
316325 return result ? . PendingUpdate ?? false ;
317326 }
327+ else if ( response . StatusCode == System . Net . HttpStatusCode . NotFound )
328+ {
329+ _logger . LogDebug ( "Orchestrator {OrchestratorId} not found in API" , orchestratorId ) ;
330+ }
318331
319332 return false ;
320333 }
@@ -345,5 +358,6 @@ public async Task AcknowledgeUpdateAsync(string orchestratorId)
345358
346359public class UpdateStatusResponse
347360{
361+ [ System . Text . Json . Serialization . JsonPropertyName ( "pendingUpdate" ) ]
348362 public bool PendingUpdate { get ; set ; }
349363}
0 commit comments