{"record":{"id":"14c173fd1f2f8fd1","repo":"redis/redis-rb","slug":"values-must-not-be-empty","errorCode":null,"errorMessage":"values must not be empty","messagePattern":"values must not be empty","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/redis/commands/hashes.rb","lineNumber":519,"sourceCode":"      #\n      # The fieldset must exist on the executing connection, otherwise the\n      # server replies with a \"no such fieldset\" error.\n      #\n      # @note HIMPORT support is experimental: the client API may change in a\n      #   future minor release without a major version bump.\n      #\n      # @example\n      #   redis.himport_set(\"shared:1\", \"shared\", [\"alice\", \"alice@example.com\", \"25\"])\n      #     # => \"OK\"\n      #\n      # @param [String] key hash key to create or overwrite\n      # @param [String] fieldset_name fieldset previously prepared on this connection\n      # @param [String, Array<String>] values one or more values, order preserved\n      # @return [String] `\"OK\"`\n      # @api experimental\n      def himport_set(key, fieldset_name, *values)\n        values.flatten!(1)\n        raise ArgumentError, \"values must not be empty\" if values.empty?\n\n        send_command([:himport, \"SET\", key, fieldset_name].concat(values))\n      end\n\n      # Remove +fieldset_name+ from this connection's session. Keys already\n      # written through the fieldset are not affected.\n      #\n      # @note HIMPORT support is experimental: the client API may change in a\n      #   future minor release without a major version bump.\n      #\n      # @param [String] fieldset_name\n      # @return [Integer] `1` if the fieldset was removed, `0` if it did not exist\n      # @api experimental\n      def himport_discard(fieldset_name)\n        send_command([:himport, \"DISCARD\", fieldset_name])\n      end\n\n      # Remove all fieldsets from this connection's session.","sourceCodeStart":501,"sourceCodeEnd":537,"githubUrl":"https://github.com/redis/redis-rb/blob/2ba9010b91dab9e0fde1fbae3a9aae003f8bc307/lib/redis/commands/hashes.rb#L501-L537","documentation":"Error \"values must not be empty\" thrown in redis/redis-rb.","triggerScenarios":"Thrown at lib/redis/commands/hashes.rb:519 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass at least one field/value pair to the command; do not call it with an empty values list.","Check the calling code for an empty array or hash being splatted into the command and guard it with a presence check."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2ba9010b91dab9e0fde1fbae3a9aae003f8bc307","analyzedAt":"2026-08-23T03:54:57.017Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}