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
The FusionAuth Go client, can hide errors if a response body is not received.
This issue can be replicated by providing a bad URL to the client constructor so that it always returns a 502 with no response body.
For example:
client:=fusionauth.NewClient(nil, badUrlThatAlwaysReturnsEmpty502, apiKey)
// then, errors will be empty and err will be nil even though status code is 502resp, errors, err:=client.SearchEntitiesWithContext(ctx, req)
I think this is happening because on non 2XX response, the client intends to unmarshal the body into Errors while setting error to nil. This means, if there's nothing to unmarshal, both error and Errors end up being empty:
The FusionAuth Go client, can hide errors if a response body is not received.
This issue can be replicated by providing a bad URL to the client constructor so that it always returns a 502 with no response body.
For example:
I think this is happening because on non 2XX response, the client intends to unmarshal the body into
Errors
while settingerror
to nil. This means, if there's nothing to unmarshal, botherror
andErrors
end up being empty:https://github.com/FusionAuth/go-client/blob/2d8a30ba49969c598f87ac82ab4d0745e4133deb/pkg/fusionauth/Client.go#L116C3-L116C13
The text was updated successfully, but these errors were encountered: