diff --git a/internal/server/auth/driver_openfga.go b/internal/server/auth/driver_openfga.go index e2da3bf7490..69f8577f654 100644 --- a/internal/server/auth/driver_openfga.go +++ b/internal/server/auth/driver_openfga.go @@ -1121,9 +1121,9 @@ func (f *fga) GetInstanceAccess(ctx context.Context, projectName string, instanc if err != nil { fgaAPIErr, ok := err.(openfga.FgaApiValidationError) - if !ok || fgaAPIErr.ResponseCode() != openfga.RELATION_NOT_FOUND { + if !ok || fgaAPIErr.ResponseCode() != openfga.ERRORCODE_RELATION_NOT_FOUND { fgaNotFoundErr, ok := err.(openfga.FgaApiNotFoundError) - if ok && fgaNotFoundErr.ResponseCode() == openfga.UNDEFINED_ENDPOINT { + if ok && fgaNotFoundErr.ResponseCode() == openfga.NOTFOUNDERRORCODE_UNDEFINED_ENDPOINT { return nil, fmt.Errorf("OpenFGA server doesn't support listing users") } @@ -1176,9 +1176,9 @@ func (f *fga) GetProjectAccess(ctx context.Context, projectName string) (*api.Ac if err != nil { fgaAPIErr, ok := err.(openfga.FgaApiValidationError) - if !ok || fgaAPIErr.ResponseCode() != openfga.RELATION_NOT_FOUND { + if !ok || fgaAPIErr.ResponseCode() != openfga.ERRORCODE_RELATION_NOT_FOUND { fgaNotFoundErr, ok := err.(openfga.FgaApiNotFoundError) - if ok && fgaNotFoundErr.ResponseCode() == openfga.UNDEFINED_ENDPOINT { + if ok && fgaNotFoundErr.ResponseCode() == openfga.NOTFOUNDERRORCODE_UNDEFINED_ENDPOINT { return nil, fmt.Errorf("OpenFGA server doesn't support listing users") }