Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error handler #366

Merged
merged 2 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions okta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func (c *Config) loadAndValidate() error {
}

func errHandler(resp *http.Response, err error, numTries int) (*http.Response, error) {
defer resp.Body.Close()
if err != nil {
return nil, err
return resp, err
}
defer resp.Body.Close()
err = okta.CheckResponseForError(resp)
if err != nil {
oErr, ok := err.(*okta.Error)
Expand Down
9 changes: 4 additions & 5 deletions okta/resource_okta_app_saml.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,10 @@ func resourceAppSaml() *schema.Resource {
},
},
"single_logout_issuer": {
Type: schema.TypeString,
Optional: true,
Description: "The issuer of the Service Provider that generates the Single Logout request",
ValidateDiagFunc: stringIsURL(validURLSchemes...),
RequiredWith: []string{"single_logout_url", "single_logout_certificate"},
Type: schema.TypeString,
Optional: true,
Description: "The issuer of the Service Provider that generates the Single Logout request",
RequiredWith: []string{"single_logout_url", "single_logout_certificate"},
},
"single_logout_url": {
Type: schema.TypeString,
Expand Down