Skip to content

Commit aee4e75

Browse files
authored
[fix] GEWISDB-PS: also throw an error on redirects
1 parent f100598 commit aee4e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: ABC-Database/GEWISDB-PS.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ param(
101101
try
102102
{
103103
$headers = @{Authorization = "Bearer $Script:apiToken"}
104-
$Response = Invoke-RestMethod -Uri ($Script:url + $endPoint) -Headers $headers -MaximumRedirection 0 -ErrorAction Ignore -Body $data
104+
$Response = Invoke-RestMethod -Uri ($Script:url + $endPoint) -Headers $headers -MaximumRedirection 0 -ErrorAction Stop -Body $data
105105
} catch {
106106
$ResponseBody = ParseErrorForResponseBody($_)
107107
if ($_.Exception.Response.StatusCode.value__ -eq 403) {

0 commit comments

Comments
 (0)