Commit 01b97e32 authored by Roshan Patil's avatar Roshan Patil
Browse files

Data validation handling for nill errorfunction

parent 93f64228
Branches
Tags
2 merge requests!23Devbranch to Master,!22Route builder + Service builder
Showing with 1 addition and 1 deletion
......@@ -293,7 +293,7 @@ func (sb *ServiceBuilder) executeValidationFunction(dataKey string, fn func(inte
// executeErrorFunction exceute when validation failed for any step
func (sb *ServiceBuilder) executeErrorFunction(fn func() (map[string]interface{}, error)) (*interface{}, error) {
if fn == nil {
return nil, nil
return nil, errors.New("Data Validation failed and No recovery function found")
}
_, err := fn()
if errormdl.CheckErr(err) != nil {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment