()
| 438 | } |
| 439 | |
| 440 | async execute() { |
| 441 | // Take a clone so that we don't modify this instance during execution. |
| 442 | const builder = this.clone(); |
| 443 | |
| 444 | try { |
| 445 | await beforeExecute(builder); |
| 446 | const result = await doExecute(builder); |
| 447 | return await afterExecute(builder, result); |
| 448 | } catch (error) { |
| 449 | return await handleExecuteError(builder, error); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | throwIfNotFound(data = {}) { |
| 454 | return this.runAfter((result) => { |
no test coverage detected