You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If OAuth2 authentication fails (or requires) re-authentication during a SCIM client call ... this error should be put into a SCIMError so that the message (from the entity body) and the status code are both available to the SCIM client library user.
As noted by the title change, this actually applies to any HTTP error that does not include an entity body with the JSON for a SCIMError. In this case, the unmarshaling error should not be returned but rather the HTTP status code (and maybe message) along with the plain text from the entity body should be put into an error and returned. The incorrect code is:
if resp.StatusCode < 200 || resp.StatusCode > 299 {
var er ErrorResponse
err = json.Unmarshal(body, &er)
if err != nil {
return err
}
return er
}
The text was updated successfully, but these errors were encountered:
smoyer64
changed the title
OAuth2 errors are not nicely passed through SCIM client
HTTP and protocol errors are not nicely passed through SCIM client
Feb 27, 2020
If OAuth2 authentication fails (or requires) re-authentication during a SCIM client call ... this error should be put into a SCIMError so that the message (from the entity body) and the status code are both available to the SCIM client library user.
As noted by the title change, this actually applies to any HTTP error that does not include an entity body with the JSON for a SCIMError. In this case, the unmarshaling error should not be returned but rather the HTTP status code (and maybe message) along with the plain text from the entity body should be put into an error and returned. The incorrect code is:
The text was updated successfully, but these errors were encountered: