bblimke/webmock · error · WebMock::NetConnectNotAllowedError

Real HTTP connections are disabled. Unregistered request: #{

Error message

Real HTTP connections are disabled. Unregistered request: #{request_signature}

What it means

Error "Real HTTP connections are disabled. Unregistered request: #{request_signature}" thrown in bblimke/webmock.

Source

Thrown at lib/webmock/http_lib_adapters/manticore_adapter.rb:74

            request_signature = generate_webmock_request_signature(request, context)
            WebMock::RequestRegistry.instance.requested_signatures.put(request_signature)

            if webmock_response = registered_response_for(request_signature)
              webmock_response.raise_error_if_any
              manticore_response = generate_manticore_response(webmock_response)
              manticore_response.on_success do
                WebMock::CallbackRegistry.invoke_callbacks({lib: :manticore, real_request: false}, request_signature, webmock_response)
              end

            elsif real_request_allowed?(request_signature.uri)
              manticore_response = Manticore::Response.new(self, request, context, &block)
              manticore_response.on_complete do |completed_response|
                webmock_response = generate_webmock_response(completed_response)
                WebMock::CallbackRegistry.invoke_callbacks({lib: :manticore, real_request: true}, request_signature, webmock_response)
              end

            else
              raise WebMock::NetConnectNotAllowedError.new(request_signature)
            end

            manticore_response
          end

          def registered_response_for(request_signature)
            WebMock::StubRegistry.instance.response_for_request(request_signature)
          end

          def real_request_allowed?(uri)
            WebMock.net_connect_allowed?(uri)
          end

          def generate_webmock_request_signature(request, context)
            method = request.method.downcase
            uri = request.uri.to_s
            body = read_body(request)
            headers = split_array_values(request.headers)

View on GitHub (pinned to b187df8827)

When it happens

Trigger: Thrown at lib/webmock/http_lib_adapters/manticore_adapter.rb:74 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bblimke/webmock@b187df8827 (2026-08-23). Data as JSON: /api/errors/0a23e515b6b2c9a9. Report an issue: GitHub.