File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,13 @@ const uploadRoute: FastifyPluginAsync = async function (server) {
33
33
} catch ( err ) {
34
34
Sentry . captureException ( err ) ;
35
35
await postSlackMessage ( {
36
- text : `Failed to upload file with error: ${
36
+ text : `Failed to parse uploaded file with error: ${
37
37
err . detail ?? err . message
38
- } . Request ID: ${ request . id } `,
38
+ } . Request ID: ${ request . id } . ${
39
+ request . headers [ "api-user" ]
40
+ ? `API User: ${ request . headers [ "api-user" ] } `
41
+ : ""
42
+ } }`,
39
43
} ) ;
40
44
throw err ;
41
45
}
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ export async function sendReportEmail({
30
30
const emailSend = await sgMail . send ( msg ) ;
31
31
32
32
if ( emailSend [ 0 ] . statusCode !== 202 ) {
33
- throw new Error ( `Failed to send Email. Status: ${ emailSend [ 0 ] . statusCode } ` ) ;
33
+ throw new Error (
34
+ `Failed to send Email. Status: ${ emailSend [ 0 ] . statusCode } . Recipient: ${ email } }` ,
35
+ ) ;
34
36
}
35
37
}
36
38
@@ -53,6 +55,8 @@ export async function sendFailureEmail({
53
55
const emailSend = await sgMail . send ( msg ) ;
54
56
55
57
if ( emailSend [ 0 ] . statusCode !== 202 ) {
56
- throw new Error ( `Failed to send Email. Status: ${ emailSend [ 0 ] . statusCode } ` ) ;
58
+ throw new Error (
59
+ `Failed to send Email. Status: ${ emailSend [ 0 ] . statusCode } . Recipient: ${ email } ` ,
60
+ ) ;
57
61
}
58
62
}
You can’t perform that action at this time.
0 commit comments