Skip to content

Make add-superadmin-user idempotent #10

@prophile

Description

@prophile

Re-running add-superadmin-user with the same arguments currently produces an error:

APIError: User already exists. Use another email.
     status: "BAD_REQUEST",
       body: {
  code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL",
  message: "User already exists. Use another email.",
},
    headers: {},
 statusCode: 400,

This means you can't use add-superadmin-user in part of a setup script can be rerun (unlike bun install and bun run db:migrate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions