Skip to content

SRPCTransport silently drops interceptors passed to create() #13

@codyhartsook

Description

@codyhartsook

Summary

SRPCTransport.create() accepts interceptors: list[ClientCallInterceptor] but never stores or applies them. Interceptor middleware (logging, auth, tracing) is silently ignored.

Root cause

create() discards interceptors before construction:

@classmethod
def create(cls, card, url, config, interceptors):  # accepted
    channel = config.slimrpc_channel_factory(url)
    return cls(channel, card)  # dropped

Suggested fix

Mirror the upstream JsonRpcTransport pattern:

  1. Accept and store interceptors in __init__
  2. Forward from create()__init__
  3. Add _apply_interceptors() and call it in every method before the stub call

Affected version

slima2a 0.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions