Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: user rename API fails with 400 Sql error #5212

Closed
kyle-johnson opened this issue Feb 4, 2025 · 1 comment
Closed

bug: user rename API fails with 400 Sql error #5212

kyle-johnson opened this issue Feb 4, 2025 · 1 comment
Assignees
Labels
bug Something isn't working release: 1.457.0

Comments

@kyle-johnson
Copy link

Describe the bug

https://app.windmill.dev/openapi.html#tag/user/POST/users/rename/{email} doesn't appear to work. I'm an admin and call it and get an error back:

Exception: http://localhost:42685/api/users/rename/[email protected]: 400, Sql error: error returned from database: function array_replace(character varying[], text, text) does not exist

I can successfully call https://app.windmill.dev/openapi.html#tag/user/GET/users/username_info/{email} without issue.

To reproduce

Here's a script I'm using in Windmill:

from wmill import Windmill

def main(email: str, new_user_name: str):
    client = Windmill()

    return client.post(
        f"/users/rename/{email}",
        json={
            "new_username": new_user_name,
        }
    ).json()

Expected behavior

The user should be renamed

Screenshots

No response

Browser information

No response

Application version

v1.426.1

Additional Context

No response

@kyle-johnson kyle-johnson added the bug Something isn't working label Feb 4, 2025
@kyle-johnson
Copy link
Author

Oops, this is my mistake. We run on Postgres 13 which isn't officially supported and after checking, this works on 14 but fails on 13:

SELECT array_replace(array['1','2']::varchar[], '2'::text, '5'::text);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release: 1.457.0
Projects
None yet
Development

No branches or pull requests

2 participants