Skip to content

Commit

Permalink
Fixed error handler (#366)
Browse files Browse the repository at this point in the history
* Fixed error handler

* Removed validation for 'single_logout_issuer'
  • Loading branch information
bogdanprodan-okta committed Mar 5, 2021
1 parent e4751a5 commit a285e87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
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

0 comments on commit a285e87

Please sign in to comment.