Improve TPTiming time format error handling

This commit is contained in:
arberkatellari
2025-01-13 18:08:50 +02:00
committed by Dan Christian Bogos
parent 3acc76474d
commit 7664ffccb4
5 changed files with 42 additions and 0 deletions

View File

@@ -273,6 +273,10 @@ func ErrNotConvertibleTF(from, to string) error {
return fmt.Errorf("%s : from: %s to:%s", ErrNotConvertibleNoCaps.Error(), from, to)
}
func ErrInvalidTime(s string) error {
return fmt.Errorf("INVALID_TIME:%s", s)
}
// NewSTIRError returns a error with a *stir_authorize prefix
func NewSTIRError(reason string) error {
return fmt.Errorf("%s: %s", MetaSTIRAuthenticate, reason)