From e68353597ecd280674016b0beeead1d0fb004e90 Mon Sep 17 00:00:00 2001 From: Andy Stark Date: Wed, 4 Nov 2026 16:51:16 +0000 Subject: [PATCH] DOC-7262 Hide the Possible errors list for clients with no method signature The Possible errors block that DOC-7253 added to the API Methods tab rendered after the signature if/else, so a client with no signature (redis-rs for EVALSHA) showed "No method signature available for this client." followed by an error list. The partial call now sits inside the `if $clientSigs` branch. The ticket's second option, keeping the list and rewording the empty text, was dropped because the empty-signature text is shared by every command and the list is only useful beside a signature. Checked on a full Hugo build: EVALSHA shows the list for the ten clients with signatures and none for redis_rs_sync and redis_rs_async, and SET shows it for all twelve. The page's index.html.md and index.json carry no Possible errors block, so there was nothing to change there. The ticket names ioredis as an affected client, but the dropdown has no ioredis section (Node.js maps to node_redis only), so that case could not be checked. Learned: the Possible errors block belongs only beside a rendered signature, and the dropdown has no ioredis section Constraint: api-methods-errors.html is called only inside the `if $clientSigs` branch of api-methods-tab.html Gaps: the client dropdown was not clicked through in a browser, only the rendered HTML was inspected Ticket: DOC-7262 Co-Authored-By: Claude Sonnet 5.5 --- layouts/partials/components/api-methods-tab.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/components/api-methods-tab.html b/layouts/partials/components/api-methods-tab.html index ae49ab28c1..6b31b498b9 100644 --- a/layouts/partials/components/api-methods-tab.html +++ b/layouts/partials/components/api-methods-tab.html @@ -75,10 +75,10 @@ {{ end }}{{ $params := $sig.params }}{{ $returns := $sig.returns }}{{ $beforeParen := index (split $sig.signature "(") 0 }}{{ $parts := split $beforeParen " " }}{{ $methodName := index $parts (sub (len $parts) 1) }}{{ $methodName }}({{ if and $params (gt (len $params) 0) }} {{ range $pIdx, $param := $params }} {{ $param.name }}{{ if $param.type }}: {{ $param.type }}{{ end }}{{ if lt $pIdx (sub (len $params) 1) }},{{ end }}{{ if and $param.description (ne $param.description "") }} // {{ $param.description }}{{ end }} {{ end }}{{ end }}){{ if $returns }} → {{ if reflect.IsMap $returns }}{{ index $returns "type" }}{{ if and (index $returns "description") (ne (index $returns "description") "") }} // {{ index $returns "description" }}{{ end }}{{ else }}{{ $returns }}{{ end }}{{ end }}{{ end }} + {{ partial "components/api-methods-errors.html" (dict "commandName" $commandName "mappingId" $mappingId) }} {{ else }}

No method signature available for this client.

{{ end }} - {{ partial "components/api-methods-errors.html" (dict "commandName" $commandName "mappingId" $mappingId) }} {{ $first = false }} {{ end }}