mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix: panic occurred when the API step failed to run
This commit is contained in:
@@ -97,11 +97,11 @@ func (s *StepAPIWithOptionalArgs) Run(r *SessionRunner) (*StepResult, error) {
|
||||
extendWithAPI(s.step, api)
|
||||
|
||||
stepResult, err := runStepRequest(r, s.step)
|
||||
stepResult.StepType = stepTypeAPI
|
||||
if err != nil {
|
||||
r.summary.Success = false
|
||||
return nil, err
|
||||
return stepResult, err
|
||||
}
|
||||
stepResult.StepType = stepTypeAPI
|
||||
return stepResult, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user