Unbreak everything; thanks Go!

This commit is contained in:
Kegan Dougal 2020-06-24 13:47:03 +01:00
parent bb73c33d02
commit da441b60fc

View file

@ -108,5 +108,10 @@ func SendInvite(
}
var response PerformInviteResponse
rsAPI.PerformInvite(ctx, &request, &response)
// we need to do this because many places people will use `var err error` as the return
// arg and a nil interface != nil pointer to a concrete interface (in this case PerformError)
if response.Error != nil && response.Error.Msg != "" {
return response.Error
}
return nil
}