Skip to content

Commit e733524

Browse files
refactor: unified error logging (#2045)
1 parent d58d585 commit e733524

File tree

8 files changed

+8
-17
lines changed

8 files changed

+8
-17
lines changed

__tests__/respect/local-json-server/__snapshots__/local-json-server.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ exports[`local-json-server > local-json-server test case 1`] = `
7272
└───────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
7373
7474
75-
7675
Tests exited with error
76+
7777
"
7878
`;

__tests__/respect/max-steps/__snapshots__/max-steps.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ exports[`should quit an infinite loop on RESPECT_MAX_STEPS 1`] = `
159159
└─────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
160160
161161
162-
163162
Tests exited with error
163+
164164
"
165165
`;

__tests__/respect/reusable-components/__snapshots__/reusable-components.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ exports[`should use inputs from CLI and env to map with resolved refs 1`] = `
504504
└─────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
505505
506506
507-
508507
Tests exited with error
508+
509509
"
510510
`;

__tests__/respect/server-override-with-console-parameters/__snapshots__/server-override-with-console-parameters.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports[`should use server override from CLI and env 1`] = `
6161
└─────────────────────────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
6262
6363
64-
6564
Tests exited with error
65+
6666
"
6767
`;

__tests__/respect/severity-error-level/__snapshots__/severity-error-level.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ exports[`should use error severity level 1`] = `
188188
└────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
189189
190190
191-
192191
Tests exited with error
192+
193193
"
194194
`;

__tests__/respect/step-on-failure-type-end-action/__snapshots__/step-on-failure-type-end-action.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ exports[`should end workflow execution, context returns to the caller with appli
4545
└─────────────────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
4646
4747
48-
4948
Tests exited with error
49+
5050
"
5151
`;

__tests__/respect/workflow-failure-actions/__snapshots__/workflow-failure-actions.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ exports[`should execute successActions for each workflow step if it does not hav
7171
└──────────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘
7272
7373
74-
7574
Tests exited with error
75+
7676
"
7777
`;

packages/cli/src/wrapper.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,7 @@ export function commandWrapper<T extends CommandOptions>(
7070
if (err instanceof AbortFlowError) {
7171
// do nothing
7272
} else if (err instanceof HandledError) {
73-
// FIXME: remove differentiator between respect and openapi-core error logging
74-
if (
75-
process.env.REDOCLY_CLI_COMMAND === 'respect' ||
76-
process.env.REDOCLY_CLI_COMMAND === 'generate-arazzo'
77-
) {
78-
logger.error(err.message + '\n');
79-
logger.output('\n');
80-
} else {
81-
logger.error(err.message + '\n\n');
82-
}
73+
logger.error(err.message + '\n\n');
8374
} else {
8475
logger.error(
8576
'An unexpected error occurred. This is likely a bug that should be reported.\n'

0 commit comments

Comments
 (0)