@@ -156,7 +156,7 @@ func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error {
156
156
157
157
func (d * Driver ) StartTask (cfg * drivers.TaskConfig ) (* drivers.TaskHandle , * structs.DriverNetwork , error ) {
158
158
if _ , ok := d .tasks .Get (cfg .ID ); ok {
159
- return nil , nil , fmt .Errorf ("taskConfig with ID '%s' already started" , cfg .ID )
159
+ return nil , nil , fmt .Errorf ("task with ID %q already started" , cfg .ID )
160
160
}
161
161
162
162
var driverConfig TaskConfig
@@ -191,7 +191,7 @@ CREATE:
191
191
container , err := d .createContainer (client , containerCfg , & driverConfig )
192
192
if err != nil {
193
193
d .logger .Error ("failed to create container" , "error" , err )
194
- return nil , nil , nstructs .NewRecoverableError (fmt .Errorf ("failed to create container: %v" , err ), nstructs . IsRecoverable ( err ) )
194
+ return nil , nil , nstructs .WrapRecoverable (fmt .Sprintf ("failed to create container: %v" , err ), err )
195
195
}
196
196
197
197
d .logger .Info ("created container" , "container_id" , container .ID )
@@ -213,7 +213,7 @@ CREATE:
213
213
d .logger .Debug ("reattempting container create/start sequence" , "attempt" , startAttempts , "container_id" , id )
214
214
goto CREATE
215
215
}
216
- return nil , nil , nstructs .NewRecoverableError (fmt .Errorf ("Failed to start container %s: %s" , container .ID , err ), nstructs . IsRecoverable ( err ) )
216
+ return nil , nil , nstructs .WrapRecoverable (fmt .Sprintf ("Failed to start container %s: %s" , container .ID , err ), err )
217
217
}
218
218
219
219
// InspectContainer to get all of the container metadata as
0 commit comments