Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Aug 5, 2024
1 parent 4d25f38 commit faecf6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/controllers/v2/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ function prepProgressMessage(
status: string,
errorReason: string
): string {
const msg = `Your Job (<${jobUrl}${jobId}|${jobTitle}>) `;
const env = c.get<string>('env');
const deprecationWarning =
env === 'prd'
? 'The Autobuilder for staging will be deprecated by Sept. 30th. Please reach out to #ask-docs-platform on questions on how to migrate to Netlify for staging builds.'
: '';
const msg = `Your Job (<${jobUrl}${jobId}|${jobTitle}>) `;
switch (status) {
case 'inQueue':
return msg + 'has successfully been added to the ' + env + ' queue.';
return msg + `has successfully been added to the ' + env + ' queue. ${deprecationWarning}`;
case 'inProgress':
return msg + 'is now being processed.';
case 'completed':
Expand Down

0 comments on commit faecf6b

Please sign in to comment.