unkey icon indicating copy to clipboard operation
unkey copied to clipboard

Creating a LLM Gateway with the same domain leads to error without toast

Open Flo4604 opened this issue 1 year ago • 1 comments

Preliminary Checks

  • [X] I have reviewed the documentation: https://unkey.com/docs

  • [X] I have searched for existing issues: https://github.com/unkeyed/unkey/issues

  • [X] This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.

Reproduction / Replay Link (Optional)

No response

Issue Summary

When you have a LLM gateway for example https://flo.llm.unkey.io and you try to use the same domain in another workspace nothing happens.

Taking a look in the dev tools you can see the error POST https://app.unkey.com/api/trpc/llmGateway.create?batch=1 412 (Precondition Failed)

[
    {
        "error": {
            "json": {
                "message": "Gateway subdomains must have unique names. Please try a different subdomain. <br/> If you believe this is an error and the subdomain should not be in use already, please contact support at [email protected]",
                "code": -32012,
                "data": {
                    "code": "PRECONDITION_FAILED",
                    "httpStatus": 412,
                    "stack": "TRPCError: Gateway subdomains must have unique names. Please try a different subdomain. <br/> If you believe this is an error and the subdomain should not be in use already, please contact support at [email protected]\n    at (vc/edge/function:297:69472)\n    at (vc/edge/function:297:69039)\n    at (vc/edge/function:294:129539)\n    at (vc/edge/function:294:128935)\n    at (vc/edge/function:294:128935)\n    at (vc/edge/function:294:128935)\n    at (vc/edge/function:294:128935)\n    at (vc/edge/function:294:129258)\n    at (vc/edge/function:336:13706)",
                    "path": "llmGateway.create"
                }
            }
        }
    }
]

Steps to Reproduce

  1. Create LLM Gateway in one workspace and choose a name
  2. Switch workspace
  3. Try to Create a new LLM Gateway with the same name in 1.
  4. Error happens

Expected behavior

This error should be shown in a toast

Other information

No response

Screenshots

No response

Version info

-

Flo4604 avatar Oct 13 '24 16:10 Flo4604

Closing as llm gateways will be deprecated

Flo4604 avatar Oct 14 '24 15:10 Flo4604