File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
storage/framework/core/email/src Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -57,25 +57,27 @@ export class Email {
57
57
}
58
58
}
59
59
60
- public async onError ( error : Error ) {
60
+ public async onError ( error : Error ) : Promise < { message : string } > {
61
61
log . error ( error )
62
62
63
63
if ( ! this . message . onError )
64
- return
64
+ return { message : 'error!' }
65
65
66
66
return await this . message . onError ( error )
67
67
}
68
68
69
- public onSuccess ( ) {
69
+ public async onSuccess ( ) : Promise < { message : string } > {
70
70
try {
71
71
if ( ! this . message . onSuccess )
72
- return
72
+ return { message : 'Error!' }
73
73
74
74
this . message . onSuccess ( )
75
75
}
76
76
catch ( error ) {
77
- return this . onError ( error as Error )
77
+ return await this . onError ( error as Error )
78
78
}
79
+
80
+ return { message : 'Success!' }
79
81
}
80
82
}
81
83
You can’t perform that action at this time.
0 commit comments