diff --git a/api/clients/disperser_client.go b/api/clients/disperser_client.go index 50fc4500b0..2c5e46a748 100644 --- a/api/clients/disperser_client.go +++ b/api/clients/disperser_client.go @@ -107,10 +107,14 @@ func (c *disperserClient) DisperseBlob(ctx context.Context, data []byte, quorums } func (c *disperserClient) DisperseBlobAuthenticated(ctx context.Context, data []byte, quorums []uint8) (*disperser.BlobStatus, []byte, error) { + if c.signer == nil { + return nil, nil, fmt.Errorf("uninitialized signer for authenticated dispersal") + } + // first check if signer is valid accountId, err := c.signer.GetAccountID() if err != nil { - return nil, nil, err + return nil, nil, fmt.Errorf("please configure signer key if you want to use authenticated endpoint %w", err) } quorumNumbers := make([]uint32, len(quorums)) diff --git a/api/clients/eigenda_client.go b/api/clients/eigenda_client.go index 3e571c9abc..cc7597f8ca 100644 --- a/api/clients/eigenda_client.go +++ b/api/clients/eigenda_client.go @@ -45,8 +45,10 @@ func NewEigenDAClient(log log.Logger, config EigenDAClientConfig) (*EigenDAClien var signer core.BlobRequestSigner if len(config.SignerPrivateKeyHex) == 64 { signer = auth.NewLocalBlobRequestSigner(config.SignerPrivateKeyHex) - } else { + } else if len(config.SignerPrivateKeyHex) == 0 { signer = auth.NewLocalNoopSigner() + } else { + return nil, fmt.Errorf("invalid length for signer private key") } llConfig := NewConfig(host, port, config.ResponseTimeout, !config.DisableTLS)