We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e081232 commit acc680eCopy full SHA for acc680e
src/tools/testmanagement-utils/create-testcase.ts
@@ -143,6 +143,7 @@ export function sanitizeArgs(args: any) {
143
return cleaned;
144
}
145
146
+
147
export async function createTestCase(
148
params: TestCaseCreateRequest,
149
): Promise<TestCaseResponse> {
@@ -188,6 +189,12 @@ export async function createTestCase(
188
189
},
190
191
);
192
193
+ // Check if the response indicates success
194
+ if (!response.data.data.success) {
195
+ throw new Error(`Failed to create test case: ${JSON.stringify(response.data)}`);
196
+ }
197
198
return response.data;
199
} catch (error) {
200
if (error instanceof AxiosError) {
@@ -202,3 +209,4 @@ export async function createTestCase(
202
209
throw error;
203
210
204
211
212
0 commit comments