[?1h=DEBUG:    2+  >>>> & $env:CAPTURE_SCRIPT

DEBUG:   16+  >>>> $ErrorActionPreference = "Stop"

DEBUG:   17+  >>>> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

DEBUG:   19+  >>>> $repo = "pingdotgg/t3code"

DEBUG:   20+  >>>> $baseUrl = if ($env:T3CODE_RELEASE_BASE_URL) { $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "http://127.0.0.1:34153/$repo/releases/download" }

DEBUG:   20+ $baseUrl = if ( >>>> $env:T3CODE_RELEASE_BASE_URL) { $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "http://127.0.0.1:34153/$repo/releases/download" }

DEBUG:   20+ $baseUrl = if ($env:T3CODE_RELEASE_BASE_URL) {  >>>> $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "http://127.0.0.1:34153/$repo/releases/download" }

DEBUG:   21+  >>>> $t3Home = if ($env:T3CODE_HOME) { $env:T3CODE_HOME } else { Join-Path $HOME ".t3" }

DEBUG:   21+ $t3Home = if ( >>>> $env:T3CODE_HOME) { $env:T3CODE_HOME } else { Join-Path $HOME ".t3" }

DEBUG:   21+ $t3Home = if ($env:T3CODE_HOME) {  >>>> $env:T3CODE_HOME } else { Join-Path $HOME ".t3" }

DEBUG:   22+  >>>> $binDir = if ($env:T3CODE_INSTALL_BIN_DIR) { $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" }

DEBUG:   22+ $binDir = if ( >>>> $env:T3CODE_INSTALL_BIN_DIR) { $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" }

DEBUG:   22+ $binDir = if ($env:T3CODE_INSTALL_BIN_DIR) {  >>>> $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" }

DEBUG:   24+  >>>> $binDir = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($binDir)

DEBUG:   31+  >>>> $terminal = -not [Console]::IsErrorRedirected -and $env:TERM -ne "dumb"

DEBUG:   32+  >>>> $interactive = $terminal -and $Host.UI.SupportsVirtualTerminal

DEBUG:   33+ if ( >>>> $interactive) {

DEBUG:   35+    >>>> $glyphs = -join [char[]](0x2588, 0x2580, 0x2584, 0x25A0, 0x00B7)

DEBUG:   36+    >>>> $encoding = [Console]::Error.Encoding

DEBUG:   37+    >>>> $interactive = $encoding.GetString($encoding.GetBytes($glyphs)) -eq $glyphs

DEBUG:   39+  >>>> $esc = [char]27

DEBUG:   40+  >>>> $reset = $bold = $muted = $accent = $green = ""

DEBUG:   40+ $reset =  >>>> $bold = $muted = $accent = $green = ""

DEBUG:   40+ $reset = $bold =  >>>> $muted = $accent = $green = ""

DEBUG:   40+ $reset = $bold = $muted =  >>>> $accent = $green = ""

DEBUG:   40+ $reset = $bold = $muted = $accent =  >>>> $green = ""

DEBUG:   41+ if ( >>>> $interactive -and -not $env:NO_COLOR) {

DEBUG:  120+  >>>> [Console]::Error.WriteLine("CAPTURE_DISPATCH terminal=$terminal interactive=$interactive mechanism=H encoding=$([Console]::Error.Encoding.WebName)")

DEBUG:  120+ [Console]::Error.WriteLine("CAPTURE_DISPATCH terminal=$terminal interactive=$interactive mechanism=H encoding=$( >>>> [Console]::Error.Encoding.WebName)")

CAPTURE_DISPATCH terminal=True interactive=True mechanism=H encoding=utf-8
DEBUG:  122+  >>>> Fetch $env:CAPTURE_URL $env:CAPTURE_DEST -progress

DEBUG:   80+ function Fetch([string] $uri, [string] $destination, [switch] $progress)  >>>> {

DEBUG:   81+   if ( >>>> -not $progress -or -not $interactive) {

DEBUG:   86+    >>>> Add-Type -AssemblyName System.Net.Http

DEBUG:   87+    >>>> $client = New-Object System.Net.Http.HttpClient

DEBUG:   88+    >>>> $response = $source = $file = $null

DEBUG:   88+   $response =  >>>> $source = $file = $null

DEBUG:   88+   $response = $source =  >>>> $file = $null

DEBUG:   90+     for ( >>>> $attempt = 1; ; $attempt++) {

DEBUG:   91+       try {  >>>> $response = $client.GetAsync($uri, [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead).GetAwaiter().GetResult() }

DEBUG:   93+       if ( >>>> $response.IsSuccessStatusCode -or -not (Wait-Retry ([int]$response.StatusCode) $attempt)) { break }

DEBUG:   69+ function Wait-Retry([int] $status, [int] $attempt)  >>>> {

DEBUG:   70+   if ( >>>> $attempt -ge 4 -or ($status -ge 400 -and $status -lt 500 -and $status -ne 408 -and $status -ne 429)) { return $false }

DEBUG:   71+    >>>> Start-Sleep -Seconds ([Math]::Pow(2, $attempt - 1))

DEBUG:   72+   return  >>>> $true

DEBUG:   73+  >>>> }

DEBUG:   94+        >>>> $response.Dispose()

DEBUG:   90+     for ($attempt = 1; ;  >>>> $attempt++) {

DEBUG:   91+       try {  >>>> $response = $client.GetAsync($uri, [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead).GetAwaiter().GetResult() }

DEBUG:   93+       if ( >>>> $response.IsSuccessStatusCode -or -not (Wait-Retry ([int]$response.StatusCode) $attempt)) { break }

DEBUG:   69+ function Wait-Retry([int] $status, [int] $attempt)  >>>> {

DEBUG:   70+   if ( >>>> $attempt -ge 4 -or ($status -ge 400 -and $status -lt 500 -and $status -ne 408 -and $status -ne 429)) { return $false }

DEBUG:   71+    >>>> Start-Sleep -Seconds ([Math]::Pow(2, $attempt - 1))

DEBUG:   72+   return  >>>> $true

DEBUG:   73+  >>>> }

DEBUG:   94+        >>>> $response.Dispose()

DEBUG:   90+     for ($attempt = 1; ;  >>>> $attempt++) {

DEBUG:   91+       try {  >>>> $response = $client.GetAsync($uri, [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead).GetAwaiter().GetResult() }

DEBUG:   93+       if ( >>>> $response.IsSuccessStatusCode -or -not (Wait-Retry ([int]$response.StatusCode) $attempt)) { break }

DEBUG:   69+ function Wait-Retry([int] $status, [int] $attempt)  >>>> {

DEBUG:   70+   if ( >>>> $attempt -ge 4 -or ($status -ge 400 -and $status -lt 500 -and $status -ne 408 -and $status -ne 429)) { return $false }

DEBUG:   71+    >>>> Start-Sleep -Seconds ([Math]::Pow(2, $attempt - 1))

DEBUG:   72+   return  >>>> $true

DEBUG:   73+  >>>> }

DEBUG:   94+        >>>> $response.Dispose()

DEBUG:   90+     for ($attempt = 1; ;  >>>> $attempt++) {

DEBUG:   91+       try {  >>>> $response = $client.GetAsync($uri, [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead).GetAwaiter().GetResult() }

DEBUG:   93+       if ( >>>> $response.IsSuccessStatusCode -or -not (Wait-Retry ([int]$response.StatusCode) $attempt)) { break }

DEBUG:   69+ function Wait-Retry([int] $status, [int] $attempt)  >>>> {

DEBUG:   70+   if ( >>>> $attempt -ge 4 -or ($status -ge 400 -and $status -lt 500 -and $status -ne 408 -and $status -ne 429)) { return $false }

DEBUG:   70+   if ($attempt -ge 4 -or ($status -ge 400 -and $status -lt 500 -and $status -ne 408 -and $status -ne 429)) { return  >>>> $false }

DEBUG:   73+  >>>> }

DEBUG:   93+       if ($response.IsSuccessStatusCode -or -not (Wait-Retry ([int]$response.StatusCode) $attempt)) {  >>>> break }

DEBUG:   96+      >>>> $response.EnsureSuccessStatusCode() | Out-Null

DEBUG:  114+     if ( >>>> $file) { $file.Dispose() }

DEBUG:  115+     if ( >>>> $source) { $source.Dispose() }

DEBUG:  116+     if ( >>>> $response) { $response.Dispose() }

DEBUG:  116+     if ($response) {  >>>> $response.Dispose() }

DEBUG:  117+      >>>> $client.Dispose()

DEBUG:  127+    >>>> [Console]::Error.WriteLine("EXCEPTION_TYPE=$($_.Exception.GetType().FullName)")

DEBUG:  127+   [Console]::Error.WriteLine("EXCEPTION_TYPE=$( >>>> $_.Exception.GetType().FullName)")

EXCEPTION_TYPE=System.Management.Automation.MethodInvocationException
DEBUG:  128+    >>>> [Console]::Error.WriteLine("ORIGINAL_STATUS=$([int]$_.Exception.Response.StatusCode)")

DEBUG:  128+   [Console]::Error.WriteLine("ORIGINAL_STATUS=$( >>>> [int]$_.Exception.Response.StatusCode)")

ORIGINAL_STATUS=0
DEBUG:  129+    >>>> [Console]::Error.WriteLine("STATUS_VALUE=$($_.Exception.Response.StatusCode.value__)")

DEBUG:  129+   [Console]::Error.WriteLine("STATUS_VALUE=$( >>>> $_.Exception.Response.StatusCode.value__)")

STATUS_VALUE=
DEBUG:  130+    >>>> [Console]::Error.WriteLine("EXCEPTION=$($_.Exception.Message)")

DEBUG:  130+   [Console]::Error.WriteLine("EXCEPTION=$( >>>> $_.Exception.Message)")

EXCEPTION=Exception calling "EnsureSuccessStatusCode" with "0" argument(s): "Response status code does not indicate success: 504 (Gateway Timeout)."
DEBUG:  131+    >>>> throw

DEBUG:  132+ } finally {  >>>> [Console]::Error.WriteLine("CAPTURE_CALLER_FINALLY") }

CAPTURE_CALLER_FINALLY
ParentContainsErrorRecordException: /tmp/lead-32913-r1/evidence-capture/runs-20261110T104757.726561Z/P13-four-504-H/after/install.ps1:96
Line |
  96 |      $response.EnsureSuccessStatusCode() | Out-Null
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "EnsureSuccessStatusCode" with "0" argument(s): "Response status code does not indicate
     | success: 504 (Gateway Timeout)."
