Skip to content

Commit 8ce3b0f

Browse files
authored
fix: Fix problematic error returns (#1102)
Signed-off-by: cuishuang <[email protected]>
1 parent be1e383 commit 8ce3b0f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/grpc/dapr/dapr_api_pubsub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (d *daprGrpcAPI) publishMessageGRPC(ctx context.Context, msg *pubsub.NewMes
242242
decoded, decodeErr := base64.StdEncoding.DecodeString(data.(string))
243243
if decodeErr != nil {
244244
log.DefaultLogger.Debugf("unable to base64 decode cloudEvent field data_base64: %s", decodeErr)
245-
return err
245+
return decodeErr
246246
}
247247

248248
envelope.Data = decoded

pkg/grpc/default_api/api_pubsub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (a *api) envelopeFromSubscriptionMessage(ctx context.Context, msg *pubsub.N
245245
decoded, decodeErr := base64.StdEncoding.DecodeString(data.(string))
246246
if decodeErr != nil {
247247
log.DefaultLogger.Debugf("unable to base64 decode cloudEvent field data_base64: %s", decodeErr)
248-
return nil, cloudEvent, err
248+
return nil, cloudEvent, decodeErr
249249
}
250250

251251
envelope.Data = decoded

0 commit comments

Comments
 (0)