@@ -177,7 +177,7 @@ func runCreateCommand(cmd *cobra.Command, clients *shared.ClientFactory) error {
177177func getEpochFromTTL (ttl string ) (int64 , error ) {
178178 lower := strings .TrimSpace (strings .ToLower (ttl ))
179179 if lower == "" {
180- return 0 , slackerror .New (slackerror .ErrInvalidArchiveTTL )
180+ return 0 , slackerror .New (slackerror .ErrInvalidSandboxArchiveTTL )
181181 }
182182
183183 var target time.Time
@@ -187,23 +187,23 @@ func getEpochFromTTL(ttl string) (int64, error) {
187187 case strings .HasSuffix (lower , "d" ):
188188 n , err := strconv .Atoi (strings .TrimSuffix (lower , "d" ))
189189 if err != nil || n < 1 {
190- return 0 , slackerror .New (slackerror .ErrInvalidArchiveTTL )
190+ return 0 , slackerror .New (slackerror .ErrInvalidSandboxArchiveTTL )
191191 }
192192 target = now .AddDate (0 , 0 , n )
193193 case strings .HasSuffix (lower , "w" ):
194194 n , err := strconv .Atoi (strings .TrimSuffix (lower , "w" ))
195195 if err != nil || n < 1 {
196- return 0 , slackerror .New (slackerror .ErrInvalidArchiveTTL )
196+ return 0 , slackerror .New (slackerror .ErrInvalidSandboxArchiveTTL )
197197 }
198198 target = now .AddDate (0 , 0 , n * 7 )
199199 case strings .HasSuffix (lower , "mo" ):
200200 n , err := strconv .Atoi (strings .TrimSuffix (lower , "mo" ))
201201 if err != nil || n < 1 {
202- return 0 , slackerror .New (slackerror .ErrInvalidArchiveTTL )
202+ return 0 , slackerror .New (slackerror .ErrInvalidSandboxArchiveTTL )
203203 }
204204 target = now .AddDate (0 , n , 0 )
205205 default :
206- return 0 , slackerror .New (slackerror .ErrInvalidArchiveTTL )
206+ return 0 , slackerror .New (slackerror .ErrInvalidSandboxArchiveTTL )
207207 }
208208
209209 return target .Unix (), nil
@@ -260,7 +260,7 @@ func getTemplateID(template string) (int, error) {
260260 if id , err := strconv .Atoi (key ); err == nil {
261261 return id , nil
262262 }
263- return 0 , slackerror .New (slackerror .ErrInvalidTemplateID ).
263+ return 0 , slackerror .New (slackerror .ErrInvalidSandboxTemplateID ).
264264 WithMessage ("Invalid template: %q" , template )
265265}
266266
0 commit comments