From 881ded861b70c94d84a2b891cad3bc825653c9db Mon Sep 17 00:00:00 2001 From: RBarrabe Date: Mon, 9 May 2016 14:59:34 +0200 Subject: [PATCH] Adding error case to have correct value in template without prefix --- agents/dmtagent.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/agents/dmtagent.go b/agents/dmtagent.go index eead8072d..cb927bbd3 100644 --- a/agents/dmtagent.go +++ b/agents/dmtagent.go @@ -160,6 +160,10 @@ func (self DiameterAgent) processCCR(ccr *CCR, reqProcessor *config.DARequestPro processorVars[CGRError] = utils.ErrInsufficientCredit.Error() case strings.HasSuffix(err.Error(), utils.ErrAccountDisabled.Error()): processorVars[CGRError] = utils.ErrAccountDisabled.Error() + case strings.HasSuffix(err.Error(), utils.ErrRatingPlanNotFound.Error()): + processorVars[CGRError] = utils.ErrRatingPlanNotFound.Error() + case strings.HasSuffix(err.Error(), utils.ErrUnauthorizedDestination.Error()): + processorVars[CGRError] = utils.ErrUnauthorizedDestination.Error() default: // Unknown error processorVars[CGRError] = err.Error() processorVars[CGRResultCode] = strconv.Itoa(DiameterRatingFailed)