Skip to content

Commit

Permalink
fixed overly aggressive error trapping in OVH plugin (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbolger committed Aug 6, 2019
1 parent d932edc commit 53c3fbd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Posh-ACME/DnsPlugins/OVH.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,12 @@ function Find-OVHDomain {
# save the zone name
$script:OVHRecordZones.$RecordName = $zoneTest
return $zoneTest
} catch { Write-Debug "OVH Error: $($_.Exception.Message)" } # generally expecting a 404 here
} catch {
# re-throw anything except a 404 because it just means the zone doesn't exist
if (404 -ne $_.Exception.Response.StatusCode.value__) {
throw
}
}
}

throw "No zone found for $RecordName"
Expand Down

0 comments on commit 53c3fbd

Please sign in to comment.