-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Hi, many thanks for providing this module. A few issues below, mostly to do with error processing around line 491.
-
I believe this module requires PowerShell 6 due to this class: [Microsoft.PowerShell.Commands.HttpResponseException]. PowerShell 5.1 does not contain that class.
-
There are two typos involving this: X-Okta-Requst-Id
-
In the absence of $_.ErrorDetails.Message at line 502 (as I had for the moment to comment out the reference to the above class) this code can be used to nevertheless retrieve the helpful (even essential) Okta error message:
try
{
$sr = New-Object -TypeName System.IO.StreamReader($_.Exception.Response.GetResponseStream())
$resp = $sr.ReadToEnd()
$oktaException = ConvertFrom-Json -InputObject $resp
}
catch
{
$oktaException = $false
}
Metadata
Metadata
Assignees
Labels
No labels