{"record":{"id":"6f321de717180c8a","repo":"bensheldon/good_job","slug":"invalid-type","errorCode":null,"errorMessage":"Invalid type","messagePattern":"Invalid type","errorType":"http","errorClass":"ActionController::BadRequest","httpStatus":400,"severity":"error","filePath":"app/controllers/good_job/pauses_controller.rb","lineNumber":31,"sourceCode":"\n      GoodJob::Setting.pause(pause_type => pause_value)\n      redirect_to({ action: :index }, notice: \"Successfully paused #{params[:type]} '#{params[:value]}'\", status: :see_other)\n    end\n\n    def destroy\n      pause_type = params[:type].to_sym\n      pause_value = params[:value].to_s\n\n      GoodJob::Setting.unpause(pause_type => pause_value)\n      redirect_to({ action: :index }, notice: \"Successfully unpaused #{params[:type]} '#{params[:value]}'\", status: :see_other)\n    end\n\n    private\n\n    def validate_type\n      return if params[:type].in?(%w[queue job_class label]) && params[:value].to_s.present?\n\n      raise ActionController::BadRequest, \"Invalid type\"\n    end\n  end\nend\n","sourceCodeStart":13,"sourceCodeEnd":35,"githubUrl":"https://github.com/bensheldon/good_job/blob/5fcde48f8765e69901ffa9c5a06122b19c73875f/app/controllers/good_job/pauses_controller.rb#L13-L35","documentation":"Error \"Invalid type\" thrown in bensheldon/good_job.","triggerScenarios":"Thrown at app/controllers/good_job/pauses_controller.rb:31 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a valid pause type (queue, job_class, or label) to the pauses controller.","Set the type param to one of the types supported by GoodJob::PausesController."],"exampleFix":"# Set type=queue (or job_class/label) in the pause request","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5fcde48f8765e69901ffa9c5a06122b19c73875f","analyzedAt":"2026-08-23T14:55:11.399Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}