Skip to content

Commit 0ef67dc

Browse files
Fix NPE for start API with blobstore (#589)
1 parent 087cc24 commit 0ef67dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/api/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (s *serviceImpl) ApiV1WorkflowStartPost(
187187
return nil, s.handleError(err, WorkflowStartApiPath, req.GetWorkflowId())
188188
}
189189
// 1. check the size of the input is larger than the threshold
190-
if len(*input.StateInput.Data) > s.config.ExternalStorage.ThresholdInBytes {
190+
if input.StateInput != nil && len(input.StateInput.GetData()) > s.config.ExternalStorage.ThresholdInBytes {
191191
// 2. if it is, upload the input to S3
192192
storeId, path, err := s.store.WriteObject(ctx, req.GetWorkflowId(), input.StateInput.GetData())
193193
if err != nil {

0 commit comments

Comments
 (0)