@hubspot/cli 7.4.4-experimental.0 → 7.4.6-experimental.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/projects/index.js +7 -2
- package/package.json +1 -1
package/lib/projects/index.js
CHANGED
|
@@ -140,7 +140,12 @@ async function ensureProjectExists(accountId, projectName, { forceCreate = false
|
|
|
140
140
|
return { projectExists: !!project, project };
|
|
141
141
|
}
|
|
142
142
|
catch (err) {
|
|
143
|
-
|
|
143
|
+
// @ts-expect-error
|
|
144
|
+
logger_1.logger.log('statusCode', err.status);
|
|
145
|
+
const isError = (0, index_1.isSpecifiedError)(err, { statusCode: 404 });
|
|
146
|
+
logger_1.logger.log('is404', isError);
|
|
147
|
+
logger_1.logger.log('isHubspotHttpError', (0, index_1.isHubSpotHttpError)(err));
|
|
148
|
+
if (isError) {
|
|
144
149
|
let shouldCreateProject = forceCreate;
|
|
145
150
|
if (allowCreate && !shouldCreateProject) {
|
|
146
151
|
const promptKey = uploadCommand ? 'createPromptUpload' : 'createPrompt';
|
|
@@ -180,7 +185,7 @@ async function ensureProjectExists(accountId, projectName, { forceCreate = false
|
|
|
180
185
|
return { projectExists: false };
|
|
181
186
|
}
|
|
182
187
|
}
|
|
183
|
-
|
|
188
|
+
// logError(err, new ApiErrorContext({ accountId }));
|
|
184
189
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
185
190
|
}
|
|
186
191
|
}
|
package/package.json
CHANGED