Skip to content

Commit

Permalink
fix: parsing handler
Browse files Browse the repository at this point in the history
  • Loading branch information
skynet2 committed Mar 25, 2024
1 parent fda7ea1 commit 94ed911
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions cmd/client/apimonkey/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,11 @@ func (i *Instance) Run() {
return
}

if selectorVal.Type == gjson.String {
if str := selectorVal.String(); str != "" {
sdk.ShowAlert(i.contextApp)
lg.Err(errors.Wrap(err, "error parsing StringBytes")).Send()
return
} else {
value = str
}
} else {
value = selectorVal.String()
value = selectorVal.String()

if value == "" {
sdk.ShowAlert(i.contextApp)
lg.Err(errors.Wrap(err, "empty value got from ResponseJSONSelector")).Send()
}
}

Expand Down

0 comments on commit 94ed911

Please sign in to comment.