mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:37:31 +00:00
fix: cryptic error message for user not found (#6787)
* fix: cryptic error message for user not found * fix: cryptic error message for user not found, fix test
This commit is contained in:
@@ -262,7 +262,7 @@ func (s *SessionCommands) gethumanWriteModel(ctx context.Context) (*HumanWriteMo
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if humanWriteModel.UserState != domain.UserStateActive {
|
if humanWriteModel.UserState != domain.UserStateActive {
|
||||||
return nil, caos_errs.ThrowPreconditionFailed(nil, "COMMAND-Df4b3", "Errors.ie4Ai.NotFound")
|
return nil, caos_errs.ThrowPreconditionFailed(nil, "COMMAND-Df4b3", "Errors.User.NotFound")
|
||||||
}
|
}
|
||||||
return humanWriteModel, nil
|
return humanWriteModel, nil
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@ func TestSessionCommands_getHumanWriteModel(t *testing.T) {
|
|||||||
},
|
},
|
||||||
res: res{
|
res: res{
|
||||||
want: nil,
|
want: nil,
|
||||||
err: caos_errs.ThrowPreconditionFailed(nil, "COMMAND-Df4b3", "Errors.ie4Ai.NotFound"),
|
err: caos_errs.ThrowPreconditionFailed(nil, "COMMAND-Df4b3", "Errors.User.NotFound"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user