{"record":{"id":"7ab5c322c1b75df3","repo":"SeleniumHQ/selenium","slug":"unknown-http-verb-verb-inspect","errorCode":null,"errorMessage":"unknown HTTP verb: #{verb.inspect}","messagePattern":"unknown HTTP verb: #(.+?)","errorType":"exception","errorClass":"Error::WebDriverError","httpStatus":null,"severity":"error","filePath":"rb/lib/selenium/webdriver/remote/http/curb.rb","lineNumber":78,"sourceCode":"            # http://github.com/taf2/curb/issues/issue/33\n            client.head = false\n            client.delete = false\n\n            case verb\n            when :get\n              client.http_get\n            when :post\n              client.post_body = payload || ''\n              client.http_post\n            when :put\n              client.put_data = payload || ''\n              client.http_put\n            when :delete\n              client.http_delete\n            when :head\n              client.http_head\n            else\n              raise Error::WebDriverError, \"unknown HTTP verb: #{verb.inspect}\"\n            end\n\n            create_response client.response_code, client.body_str, client.content_type\n          end\n\n          def client\n            @client ||= begin\n              c = Curl::Easy.new\n\n              c.max_redirects = MAX_REDIRECTS\n              c.follow_location = true\n              c.timeout = timeout if timeout\n              c.verbose = WebDriver.logger.debug?\n              c\n            end\n          end\n        end # Curb\n      end # Http","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rb/lib/selenium/webdriver/remote/http/curb.rb#L60-L96","documentation":"Raised as Error::WebDriverError by the Curb HTTP client adapter (Http::Curb) when the HTTP verb passed to request is not one of :get, :post, :put, :delete, or :head. The adapter maps known verbs to Curl::Easy methods; any other symbol/string falls through the case/when to this error.","triggerScenarios":"Using the curb adapter with a custom command that registers a non-standard HTTP verb. Passing a String verb like 'GET' instead of Symbol :get (the case uses symbols). A typo or uppercase verb symbol. A command registration bug producing an unexpected verb.","commonSituations":"Registering custom commands with add_commands using a verb the curb adapter doesn't handle. Switching from the default (Net::HTTP) adapter to curb without verifying all commands use supported verbs. Framework code that builds verbs dynamically producing incorrect values.","solutions":["Ensure all registered command verbs are one of :get, :post, :put, :delete, :head (as Symbols).","If you registered a custom command, verify the verb in the command tuple: [:patch, '/path'] is NOT supported by curb — use :put or switch to the Default (Net::HTTP) adapter.","Use the Default HTTP adapter (Net::HTTP) if you need broader verb support: Selenium::WebDriver::Remote::Http::Default.new."],"exampleFix":"# before — curb does not support :patch\nbridge.add_commands({custom: [:patch, '/session/:session_id/custom']})\n\n# after — use a supported verb, or switch adapter\nbridge.add_commands({custom: [:post, '/session/:session_id/custom']})\n# or use Default adapter which may support more verbs","handlingStrategy":"validation","validationCode":"# Validate verb before registering custom commands with curb:\nSUPPORTED_VERBS = %i[get post put delete head].freeze\nunless SUPPORTED_VERBS.include?(verb)\n  raise ArgumentError, \"curb adapter does not support verb #{verb}\"\nend","typeGuard":"def curb_supported_verb?(verb)\n  %i[get post put delete head].include?(verb)\nend","tryCatchPattern":"begin\n  http_client.request(verb, url)\nrescue Selenium::WebDriver::Error::WebDriverError => e\n  raise unless e.message.include?('unknown HTTP verb')\n  raise \"Use Default (Net::HTTP) adapter for verb #{verb}\"\nend","preventionTips":["Only use :get, :post, :put, :delete, :head (as Symbols) with the curb adapter.","Prefer the Default (Net::HTTP) adapter unless you specifically need curb.","Validate custom command verbs against the adapter's supported set before registration."],"tags":["http-client","curb","http-verb","custom-commands"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}