Start a new topic

Generic, nonspecific error message on project settings page

Hi! I've stumbled across a super minor bug (if you can even call it that) on the project settings page that should be super easy to fix. If you enter an illegal input into the new handle textbox in the change handle section, the helper text that appears below reads "An unexpected error occurred".

It's possible that this is the desired behavior, but I doubt it, because if you leave the box empty, the helper text reads "Handle is required!".

These invalid inputs make a call to /api/v1/trpc/projects.checkHandle, which returns the following response (this particular response being for the handle "ab"):
{
    "error": {
        "message": [
            {
                "validation": "regex",
                "code": "invalid_string",
                "message": "Invalid",
                "path": [
                    "handle"
                ]
            }
        ],
        "code": -32600,
        "data": {
            "code": "BAD_REQUEST",
            "httpStatus": 400,
            "path": "projects.checkHandle"
        }
    }
}

I wrote a whole thing about different ways to I thought of solve this, but obviously you know what to do. I'm super passionate about cohost, so I have to prevent myself from accidentally telling you how to do your job out of excitement. Thanks for making this wonderful website.

json
(456 Bytes)
Login or Signup to post a comment