Commit 93f64228 authored by Roshan Patil's avatar Roshan Patil
Browse files

errorfunction bug fix for nil

parent 282ef342
2 merge requests!23Devbranch to Master,!22Route builder + Service builder
Showing with 3 additions and 0 deletions
......@@ -292,6 +292,9 @@ 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
}
_, err := fn()
if errormdl.CheckErr(err) != nil {
loggermdl.LogError(err)
......
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