diff --git a/lib/theme-api-client.js b/lib/theme-api-client.js index 7dc0064a..8da6dff9 100644 --- a/lib/theme-api-client.js +++ b/lib/theme-api-client.js @@ -144,6 +144,11 @@ async function getJob({ accessToken, apiHost, storeHash, jobId, resultFilter }) const error = new Error('Job Failed'); error.name = 'JobCompletionStatusCheckError'; error.messages = (payload.data && payload.data.errors) || [{ message: payload.title }]; + //append a message to visit troubleshooting page, to help diagnose the issue. + if (error.messages) { + const visitTroubleshootingPage = `\nThe following page may help diagnose the issue: https://developer.bigcommerce.com/docs/storefront/stencil/deployment/upload-errors.`; + error.messages.message += visitTroubleshootingPage; + } throw error; } if (!payload.data || payload.data.status !== 'COMPLETED') {