{"record":{"id":"b84ffdcded690a3c","repo":"faker-ruby/faker","slug":"argument-not-found-argument-name-can-be-b","errorCode":null,"errorMessage":"'#{argument}' not found, #{argument_name} can be blank, or one of the following, as strings: #{correct_values.join(', ')}","messagePattern":"'#(.+?)' not found, #(.+?) can be blank, or one of the following, as strings: #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/faker/travel/train_station.rb","lineNumber":49,"sourceCode":"          types = %w[metro railway]\n\n          if region.nil? && type.nil?\n            region = sample(regions)\n            type = sample(types)\n          elsif region.nil?\n            validate_arguments(type, types, 'type')\n            region = sample(regions)\n          elsif type.nil?\n            validate_arguments(region, regions, 'region')\n            type = sample(types)\n          end\n          [region, type]\n        end\n\n        def validate_arguments(argument, correct_values, argument_name)\n          return if correct_values.include?(argument)\n\n          raise ArgumentError, \"'#{argument}' not found, #{argument_name} can be blank, or one of the following, as strings: #{correct_values.join(', ')}\"\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":31,"sourceCodeEnd":55,"githubUrl":"https://github.com/faker-ruby/faker/blob/cca4184947e09fdd02afb8b89d25a9c8ebc7274e/lib/faker/travel/train_station.rb#L31-L55","documentation":"Error \"'#{argument}' not found, #{argument_name} can be blank, or one of the following, as strings: #{correct_values.join(', ')}\" thrown in faker-ruby/faker.","triggerScenarios":"Thrown at lib/faker/travel/train_station.rb:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cca4184947e09fdd02afb8b89d25a9c8ebc7274e","analyzedAt":"2026-08-21T16:25:39.145Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}