Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/theme-api-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down