Actualiza toolkit operativo y documentación
This commit is contained in:
@@ -78,7 +78,9 @@ try {
|
||||
$bodyBlock = if ($parts.Count -ge 2) { $parts[1] } else { "{}" }
|
||||
|
||||
$statusLine = ($headersBlock -split "`n" | Select-Object -First 1).Trim()
|
||||
if ($statusLine -notmatch " 20[04-9] ") {
|
||||
# 2xx completo: la creación de repos/hooks/releases responde 201 y la clase
|
||||
# de caracteres anterior ([04-9]) lo trataba como error pese al éxito.
|
||||
if ($statusLine -notmatch " 20[0-9] ") {
|
||||
$snippet = $bodyBlock.Trim()
|
||||
if ($snippet.Length -gt 500) { $snippet = $snippet.Substring(0, 500) + "..." }
|
||||
throw "Gitea API HTTP error: $statusLine`nURI: $uri`nBody: $snippet"
|
||||
|
||||
Reference in New Issue
Block a user