{"record":{"id":"aa3dd992daef0077","repo":"onetimesecret/onetimesecret","slug":"invalid-border-radius-must-be-a-preset-brands","errorCode":null,"errorMessage":"Invalid border radius - must be a preset (#{BrandSettingsConstants::RADII.join(', ')}) or a whole number of pixels 0-#{BrandSettingsConstants::RADIUS_MAX}","messagePattern":"Invalid border radius - must be a preset \\(#(.+?)\\) or a whole number of pixels 0-#(.+?)","errorType":"validation","errorClass":"Onetime::Problem","httpStatus":null,"severity":"error","filePath":"lib/onetime/models/custom_domain/brand_settings.rb","lineNumber":312,"sourceCode":"        return if valid_font?(normalized[:heading_font])\n\n        raise Onetime::Problem, \"Invalid heading font - must be one of: #{BrandSettingsConstants::FONTS.join(', ')}\"\n      end\n\n      # @api private\n      def self.validate_corner_style_field!(normalized)\n        return unless normalized.key?(:corner_style) && !normalized[:corner_style].nil?\n        return if valid_corner_style?(normalized[:corner_style])\n\n        raise Onetime::Problem, \"Invalid corner style - must be one of: #{BrandSettingsConstants::CORNERS.join(', ')}\"\n      end\n\n      # @api private\n      def self.validate_border_radius_field!(normalized)\n        return unless normalized.key?(:border_radius) && !normalized[:border_radius].nil?\n        return if valid_border_radius?(normalized[:border_radius])\n\n        raise Onetime::Problem,\n          \"Invalid border radius - must be a preset (#{BrandSettingsConstants::RADII.join(', ')}) \" \\\n          \"or a whole number of pixels 0-#{BrandSettingsConstants::RADIUS_MAX}\"\n      end\n\n      # @api private\n      #\n      # Write-path validation for PER-DOMAIN (tenant-uploaded) settings only:\n      # https or app-relative. The install-wide brand.logo_url is a separate,\n      # more permissive surface — the mail renderer gates it to absolute\n      # http(s) at render time (Mail::Views TemplateContext#logo_url) and the\n      # web UI accepts relative paths. The two policies intentionally differ.\n      def self.validate_url_fields!(normalized)\n        [:logo_url, :logo_dark_url, :favicon_url].each do |url_field|\n          next unless normalized.key?(url_field) && !normalized[url_field].nil?\n          next if valid_url?(normalized[url_field])\n\n          raise Onetime::Problem, \"Invalid #{url_field.to_s.tr('_', ' ')} - must be https:// URL or relative path starting with /\"\n        end","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/onetimesecret/onetimesecret/blob/f81295e41bc3e808a3dd2cbea03ef65401a662e4/lib/onetime/models/custom_domain/brand_settings.rb#L294-L330","documentation":"Error \"Invalid border radius - must be a preset (#{BrandSettingsConstants::RADII.join(', ')}) or a whole number of pixels 0-#{BrandSettingsConstants::RADIUS_MAX}\" thrown in onetimesecret/onetimesecret.","triggerScenarios":"Thrown at lib/onetime/models/custom_domain/brand_settings.rb:312 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the preset radii or a whole number of pixels within the allowed range shown in the message."],"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"}