diff --git a/consumers/notification/v1/internal/vcarbon/carbon.go b/consumers/notification/v1/internal/vcarbon/carbon.go index 57e5b56..8aede65 100644 --- a/consumers/notification/v1/internal/vcarbon/carbon.go +++ b/consumers/notification/v1/internal/vcarbon/carbon.go @@ -64,9 +64,12 @@ func (p *Carbon) UnmarshalJSON(data []byte) error { return nil } *p = *NewFromCarbon(carbon.Parse(str)) - return &InvalidCarbonParseParameterError{ - Parameter: str, - Msg: "invalid time string", - innerError: err, + if p.Error != nil { + return &InvalidCarbonParseParameterError{ + Parameter: str, + Msg: p.Error.Error(), + innerError: p.Error, + } } + return nil }