Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyangjing committed May 9, 2024
1 parent 9d3829d commit 9dc0839
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nethttp_request_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ func (a *NetHttpRequestAdapter) SendEnum(ctx context.Context, requestInfo *abs.R
span.RecordError(err)
return nil, err
}
if result == nil {
return nil, nil
}
return result.(absser.Parsable), nil
} else if response != nil {
defer a.purge(response)
Expand Down Expand Up @@ -448,6 +451,9 @@ func (a *NetHttpRequestAdapter) SendCollection(ctx context.Context, requestInfo
span.RecordError(err)
return nil, err
}
if result == nil {
return nil, nil
}
return result.([]absser.Parsable), nil
} else if response != nil {
defer a.purge(response)
Expand Down Expand Up @@ -499,6 +505,9 @@ func (a *NetHttpRequestAdapter) SendEnumCollection(ctx context.Context, requestI
span.RecordError(err)
return nil, err
}
if result == nil {
return nil, nil
}
return result.([]any), nil
} else if response != nil {
defer a.purge(response)
Expand Down Expand Up @@ -558,6 +567,9 @@ func (a *NetHttpRequestAdapter) SendPrimitive(ctx context.Context, requestInfo *
span.RecordError(err)
return nil, err
}
if result == nil {
return nil, nil
}
return result.(absser.Parsable), nil
} else if response != nil {
defer a.purge(response)
Expand Down Expand Up @@ -639,6 +651,9 @@ func (a *NetHttpRequestAdapter) SendPrimitiveCollection(ctx context.Context, req
span.RecordError(err)
return nil, err
}
if result == nil {
return nil, nil
}
return result.([]any), nil
} else if response != nil {
defer a.purge(response)
Expand Down

0 comments on commit 9dc0839

Please sign in to comment.