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
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
This also affects
organizations.updateSome observations:
Names with two or more consecutive single-letter abbreviations are rejected:
Names with lone initials or multi-letter abbreviations are fine:
SDK version we're using is
clerk-sdk-ruby 5.1.1