{"record":{"id":"e55f60c049e1bfef","repo":"ruby-grape/grape","slug":"unknown-params-builder-params-builder-type","errorCode":null,"errorMessage":"unknown params_builder: %{params_builder_type}","messagePattern":"unknown params_builder: %(.+?)","errorType":"exception","errorClass":"Grape::Exceptions::UnknownParamsBuilder","httpStatus":null,"severity":"error","filePath":"lib/grape/params_builder.rb","lineNumber":10,"sourceCode":"# frozen_string_literal: true\n\nmodule Grape\n  module ParamsBuilder\n    extend Grape::Util::Registry\n\n    module_function\n\n    def params_builder_for(short_name)\n      raise Grape::Exceptions::UnknownParamsBuilder, short_name unless registry.key?(short_name)\n\n      registry[short_name]\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":16,"githubUrl":"https://github.com/ruby-grape/grape/blob/22d7975629846a3c0c7bd2b34e140a7a1b4af8f6/lib/grape/params_builder.rb#L1-L16","documentation":"Params builders construct the `params` object handed to endpoints (hash-like classes registered in Grape::ParamsBuilder's registry). Setting `builder: X` to a name that is not registered - the built-ins are :hash, :hashie_mash, and :hash_with_indifferent_access - raises Grape::Exceptions::UnknownParamsBuilder at endpoint definition time.","triggerScenarios":"`builder: :mash` (should be :hashie_mash). `builder: 'Hashie::Mash'` (a string class name instead of a registered short name). A custom builder class that subclasses something other than Grape::ParamsBuilder::Base, so it never gets registered.","commonSituations":"Migrating from Grape extensions (`Grape::Extensions::Hashie::Mash::ParamsBuilder`) to the short-name registry API. Typos in builder names. Custom mash-like param objects that need a registered builder class.","solutions":["Use a registered short name: `builder: :hash`, `builder: :hashie_mash`, or `builder: :hash_with_indifferent_access`.","For custom builders, subclass Grape::ParamsBuilder::Base and implement `self.call(params)`; subclassing auto-registers the class under its underscored name."],"exampleFix":"# before\nparams do\n  builder :mash # raises UnknownParamsBuilder\n  requires :name, type: String\nend\n\n# after\nparams do\n  builder :hashie_mash\n  requires :name, type: String\nend\n\n# custom\nclass MyBuilder < Grape::ParamsBuilder::Base\n  def self.call(params) = MyMash.new(params)\nend\nbuilder :my_builder","handlingStrategy":"validation","validationCode":"BUILDERS = Grape::ParamsBuilder.send(:registry).keys # :hash, :hashie_mash, :hash_with_indifferent_access\n\nraise ArgumentError, \"builder must be one of #{BUILDERS.join(', ')}\" unless BUILDERS.include?(builder_name)","typeGuard":"def registered_builder?(name) = Grape::ParamsBuilder.send(:registry).key?(name)","tryCatchPattern":null,"preventionTips":["Use the built-in short names; verify them in a console (`Grape::ParamsBuilder` registry keys).","Subclass Grape::ParamsBuilder::Base for custom builders - registration is automatic on inheritance.","Boot specs catch unregistered builder names at endpoint definition time."],"tags":["grape","params-builder","registry","configuration"],"backgroundTag":"unknown-params-builder","analyzedSha":"22d7975629846a3c0c7bd2b34e140a7a1b4af8f6","analyzedAt":"2026-08-21T17:03:54.627Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}