{"record":{"id":"b667e4860a6cce6a","repo":"onetimesecret/onetimesecret","slug":"invalid-domain-format","errorCode":null,"errorMessage":"Invalid domain format","messagePattern":"Invalid domain format","errorType":"exception","errorClass":"Onetime::Problem","httpStatus":null,"severity":"error","filePath":"lib/onetime/models/custom_domain.rb","lineNumber":991,"sourceCode":"      #\n      # @param input [String] The domain name to parse\n      # @param org_id [String] Organization ID to associate with this domain\n      #\n      # @return [Onetime::CustomDomain]\n      #\n      # @raise [PublicSuffix::DomainInvalid] If domain is invalid\n      # @raise [PublicSuffix::DomainNotAllowed] If domain is not allowed\n      # @raise [PublicSuffix::Error] For other PublicSuffix errors\n      # @raise [Onetime::Problem] If domain exceeds MAX_SUBDOMAIN_DEPTH or MAX_TOTAL_LENGTH\n      #\n      # @note BREAKING CHANGE: Second parameter changed from custid to org_id.\n      #   See {create!} for migration details.\n      #\n      def parse(input, org_id)\n        raise Onetime::Problem, 'Organization ID required' if org_id.to_s.empty?\n\n        segments = input.to_s.split('.').reject(&:empty?)\n        raise Onetime::Problem, 'Invalid domain format' if segments.empty?\n\n        raise Onetime::Problem, \"Domain too deep (max: #{MAX_SUBDOMAIN_DEPTH})\" if segments.length > MAX_SUBDOMAIN_DEPTH\n\n        raise Onetime::Problem, \"Domain too long (max: #{MAX_TOTAL_LENGTH})\" if input.length > MAX_TOTAL_LENGTH\n\n        display_domain      = self.display_domain(input)\n        OT.ld \"[CustomDomain.parse] Creating with display_domain=#{display_domain.inspect}, org_id=#{org_id.inspect}\"\n        obj                 = new(display_domain: display_domain, org_id: org_id)\n        obj._original_value = input\n\n        # Debug the created object\n        OT.ld \"[CustomDomain.parse] display_domain=#{obj.display_domain.inspect}, org_id=#{obj.org_id.inspect}, identifier=#{obj.identifier.inspect}\"\n\n        obj\n      end\n\n      # Takes the given input domain and returns the base domain,\n      # the one that the zone record would be created for. So","sourceCodeStart":973,"sourceCodeEnd":1009,"githubUrl":"https://github.com/onetimesecret/onetimesecret/blob/f81295e41bc3e808a3dd2cbea03ef65401a662e4/lib/onetime/models/custom_domain.rb#L973-L1009","documentation":"Error \"Invalid domain format\" thrown in onetimesecret/onetimesecret.","triggerScenarios":"Thrown at lib/onetime/models/custom_domain.rb:991 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter a valid hostname (e.g. example.com) without protocol, port, or path, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f81295e41bc3e808a3dd2cbea03ef65401a662e4","analyzedAt":"2026-08-23T21:13:10.635Z","schemaVersion":2},"datasetVersion":"2026-08-24T02:17:37.098Z"}