Skip to content

Commit

Permalink
invoke fallback post serve action only if it is set (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
kapishmalik authored May 9, 2024
1 parent 8a35f02 commit c88f665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/hoverfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (hf *Hoverfly) processRequest(req *http.Request) (*http.Response, chan stri
hf.applyGlobalDelay(requestDetails)
}

if result.PostServeActionInputDetails != nil {
if result.PostServeActionInputDetails != nil && result.PostServeActionInputDetails.PostServeAction != "" {
if postServeAction, ok := hf.PostServeActionDetails.Actions[result.PostServeActionInputDetails.PostServeAction]; ok {
journalIDChannel := make(chan string, 1)
go postServeAction.Execute(result.PostServeActionInputDetails.Pair, journalIDChannel, hf.Journal)
Expand Down

0 comments on commit c88f665

Please sign in to comment.