Skip to content

Commit

Permalink
moved check to happen after errors are thrown.
Browse files Browse the repository at this point in the history
Signed-off-by: quobix <[email protected]>
  • Loading branch information
daveshanley committed Nov 4, 2023
1 parent 6d69e10 commit c96ad44
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions motor/rule_applicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,14 @@ func ApplyRulesToRuleSet(execution *RuleSetExecution) *RuleSetExecutionResult {
docResolved, err = libopenapi.NewDocumentWithConfiguration(execution.Spec, docConfig)
docUnresolved, _ = libopenapi.NewDocumentWithConfiguration(execution.Spec, docConfig)

specInfo = docResolved.GetSpecInfo()
indexConfig.SpecInfo = specInfo

if err != nil {
// Done here, we can't do anything else.
return &RuleSetExecutionResult{Errors: []error{err}}
}

specInfo = docResolved.GetSpecInfo()
indexConfig.SpecInfo = specInfo

} else {
suppliedDocConfig := docResolved.GetConfiguration()
docConfig.BaseURL = suppliedDocConfig.BaseURL
Expand Down

0 comments on commit c96ad44

Please sign in to comment.