oVirt / ovirt-engine-sdk-go

The generator of Go SDK for oVirt v4.0+
Apache License 2.0
19 stars 23 forks source link

Added error handling to SSO failures #227

Closed ghost closed 3 years ago

ghost commented 3 years ago

Description of the Change

This change adds proper error handling for 401 failures when authenticating against the oVirt engine. Since the 401 error is accompanied by a HTML error message the client library would give a hard to understand error to the user. This PR fixes that by returning a clear structured auth error with a clear error message when a 401 error happens.

Alternate Designs

The oVirt engine could be changed to return a proper JSON for auth errors.

Benefits

Trivial.

Possible Drawbacks

It is a workaround for the oVirt engine behavior.

Verification Process

Verified by including it in go-ovirt-client and running the appropriate fault identification test.

Applicable Issues

Numerous customer BZ's in relation to OCP on RHV.