mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Improved error MandatoryIeMissing
This commit is contained in:
committed by
Dan Christian Bogos
parent
5fd198bf71
commit
d2fff7d7a5
@@ -398,17 +398,17 @@ func (alS *AttributeService) V1ProcessEvent(args *AttrArgsProcessEvent,
|
||||
}
|
||||
// Make sure the requested fields were populated
|
||||
if err == utils.ErrNotFound {
|
||||
for _, valIface := range args.CGREvent.Event {
|
||||
for val, valIface := range args.CGREvent.Event {
|
||||
if valIface == interface{}(utils.MetaAttributes) {
|
||||
err = utils.ErrMandatoryIeMissing
|
||||
err = utils.NewErrMandatoryIeMissing(val)
|
||||
break
|
||||
}
|
||||
}
|
||||
} else if err == nil {
|
||||
for _, valIface := range apiRply.CGREvent.Event {
|
||||
for val, valIface := range apiRply.CGREvent.Event {
|
||||
if valIface == interface{}(utils.MetaAttributes) {
|
||||
// mandatory IE missing
|
||||
err = utils.ErrMandatoryIeMissing
|
||||
err = utils.NewErrMandatoryIeMissing(val)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user