Skip to content

Organization name updates are getting rejected by the Clerk API that are false positives #130

@rbellido54

Description

@rbellido54

Hi, it seems like this is an issue with the API itself, but I'm posting it here since we found it through using this SDK. Feel free to redirect/close if this is not the right place.

Description

The Clerk API rejects organization names containing consecutive single-letter abbreviations like "B.C." with the error:

│ The organization name "B.C. LTD. (Example Organization)" is invalid: contains a URL

This appears to be a false positive in the server-side URL detection logic. The substring "B.C" is being matched as a domain-like pattern (similar to example.com), but "B.C." is a common abbreviation for the Canadian province.

Reproduction

   clerk = Clerk::SDK.new
   clerk.organizations.create(
     request: Clerk::Models::Operations::CreateOrganizationRequest.new(
       name: "1234567 B.C. LTD.",
       created_by: "user_xxx"
     )
   )
   # => Clerk::Models::Errors::ClerkErrors: "The organization name ... is invalid: contains a URL"

This also affects organizations.update

Some observations:
Names with two or more consecutive single-letter abbreviations are rejected:

  • "B.C. LTD." — rejected ("B.C" looks like a domain)
  • "U.S.A. Holdings" — rejected ("U.S" / "S.A" looks like a domain)

Names with lone initials or multi-letter abbreviations are fine:

  • "Steven D. Smith"
  • "Dr. Jane Smith"
  • "Maple Leaf Ltd."

SDK version we're using is clerk-sdk-ruby 5.1.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions