1
- // nolint:errcheck
2
1
package modzy
3
2
4
3
import (
@@ -15,7 +14,7 @@ import (
15
14
)
16
15
17
16
type JobsClient interface {
18
- // GetJobDetails will get the deatils of a job
17
+ // GetJobDetails will get the details of a job
19
18
GetJobDetails (ctx context.Context , input * GetJobDetailsInput ) (* GetJobDetailsOutput , error )
20
19
// ListJobsHistory will list job history. This supports paging, filtering and sorting.
21
20
ListJobsHistory (ctx context.Context , input * ListJobsHistoryInput ) (* ListJobsHistoryOutput , error )
@@ -191,12 +190,12 @@ func (c *standardJobsClient) SubmitJobFile(ctx context.Context, input *SubmitJob
191
190
// uploading the inputs failed, close the job
192
191
_ , _ = jobActions .Cancel (ctx )
193
192
return nil , errors .WithMessage (chunkErr , "job canceled due to failure to upload data" )
194
- } else {
195
- // close the job since everything is posted
196
- closeURL := fmt . Sprintf ( "/api/jobs/%s/ close" , response . JobIdentifier )
197
- if _ , err := c . baseClient . requestor . Post ( ctx , closeURL , nil , nil ); err != nil {
198
- return nil , errors . WithMessage ( err , "failed to close open job after successfully uploading inputs" )
199
- }
193
+ }
194
+
195
+ // close the job since everything is posted
196
+ closeURL := fmt . Sprintf ( "/api/jobs/%s/close" , response . JobIdentifier )
197
+ if _ , err := c . baseClient . requestor . Post ( ctx , closeURL , nil , nil ); err != nil {
198
+ return nil , errors . WithMessage ( err , "failed to close open job after successfully uploading inputs" )
200
199
}
201
200
202
201
return & SubmitJobFileOutput {
0 commit comments