Skip to content

create-admin-account fails with error that includes "this error should never be printed" if account exists #480

@ca-scribner

Description

@ca-scribner

Bug Description

Creating the same admin account twice fails with a message that includes "this error should never be printed". This isn't your error, but it seems to think you shouldn't expose it to the user :)

If this is intentional, feel free to close this bug!

To Reproduce

deploy iam

create admin account

juju run --model iam kratos/0 create-admin-account email=[email protected] username=user

passes

create it again

run a second time

juju run --model iam kratos/0 create-admin-account email=[email protected] username=user

fails with below message

Environment

.

Relevant log output

juju run --model iam kratos/0 create-admin-account [email protected] username=user
Running operation 5 with 1 task
  - task 6 on unit-kratos-0

Waiting for task 6...
11:08:52 Creating admin account.

Action id 6 failed: Something went wrong when trying to run the command: non-zero exit code 1 executing ['kratos', 'import', 'identities', '--endpoint', 'http://127.0.0.1:4434', '--format', 'json'], stdout='[]\n', stderr='2025/07/25 15:08:52 [DEBUG] POST http://127.0.0.1:4434/admin/identities\nThe resource could not be created due to a conflict\nThis identity conflicts with another identity that already exists.\nSTD_IN[0]: this error should never be printed\n'

Additional context

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions