@hubspot/cli 7.11.0-experimental.0 → 7.11.1-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.
|
@@ -303,7 +303,7 @@ describe('commands/project/deploy', () => {
|
|
|
303
303
|
});
|
|
304
304
|
await projectDeployCommand.handler(args);
|
|
305
305
|
expect(uiLogger.error).toHaveBeenCalledTimes(1);
|
|
306
|
-
expect(uiLogger.error).toHaveBeenCalledWith(`The request for 'project deploy' in account ${args.derivedAccountId} failed due to a client error.`);
|
|
306
|
+
expect(uiLogger.error).toHaveBeenCalledWith(expect.stringContaining(`The request for 'project deploy' in account ${args.derivedAccountId} failed due to a client error.`));
|
|
307
307
|
expect(processExitSpy).toHaveBeenCalledTimes(1);
|
|
308
308
|
expect(processExitSpy).toHaveBeenCalledWith(EXIT_CODES.ERROR);
|
|
309
309
|
});
|
package/lang/en.d.ts
CHANGED
|
@@ -3661,6 +3661,7 @@ export declare const lib: {
|
|
|
3661
3661
|
unknownErrorOccurred: string;
|
|
3662
3662
|
configTimeoutErrorOccurred: (timeout: number, configSetCommand: string) => string;
|
|
3663
3663
|
genericTimeoutErrorOccurred: string;
|
|
3664
|
+
additionalDebugContext: string;
|
|
3664
3665
|
};
|
|
3665
3666
|
suppressErrors: {
|
|
3666
3667
|
platformVersionErrors: {
|
package/lang/en.js
CHANGED
|
@@ -3683,6 +3683,7 @@ export const lib = {
|
|
|
3683
3683
|
unknownErrorOccurred: 'An unknown error has occurred.',
|
|
3684
3684
|
configTimeoutErrorOccurred: (timeout, configSetCommand) => `This error occurred because a request exceeded the default HTTP timeout of ${timeout}ms. To increase the default HTTP timeout, run ${uiCommandReference(configSetCommand)}.`,
|
|
3685
3685
|
genericTimeoutErrorOccurred: 'This error occurred because an HTTP request timed out. Re-running the command may resolve this issue.',
|
|
3686
|
+
additionalDebugContext: chalk.bold(`For more information, run the command again with the ${uiCommandReference('--debug')} flag.`),
|
|
3686
3687
|
},
|
|
3687
3688
|
suppressErrors: {
|
|
3688
3689
|
platformVersionErrors: {
|
|
@@ -14,13 +14,11 @@ export function logError(error, context) {
|
|
|
14
14
|
if (shouldSuppressError(error, context)) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
if (isHubSpotHttpError(error)
|
|
17
|
+
if (isHubSpotHttpError(error)) {
|
|
18
18
|
if (shouldSuppressError(error, error.context)) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
if (isHubSpotHttpError(error) && context) {
|
|
23
|
-
error.updateContext(context);
|
|
21
|
+
error.updateContext(context || {}, lib.errorHandlers.index.additionalDebugContext);
|
|
24
22
|
}
|
|
25
23
|
if (isHubSpotHttpError(error) && isValidationError(error)) {
|
|
26
24
|
uiLogger.error(error.formattedValidationErrors());
|
package/package.json
CHANGED