File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/tools/testmanagement-utils Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,14 @@ export async function createProjectOrFolder(
67
67
headers : { "Content-Type" : "application/json" } ,
68
68
} ,
69
69
) ;
70
+
71
+ if ( ! res . data . data . success ) {
72
+ throw new Error (
73
+ `Failed to create project: ${ JSON . stringify ( res . data ) } ` ,
74
+ ) ;
75
+ }
76
+ // Project created successfully
77
+
70
78
projId = res . data . project . identifier ;
71
79
} catch ( err ) {
72
80
const msg =
@@ -106,6 +114,14 @@ export async function createProjectOrFolder(
106
114
headers : { "Content-Type" : "application/json" } ,
107
115
} ,
108
116
) ;
117
+
118
+ if ( ! res . data . data . success ) {
119
+ throw new Error (
120
+ `Failed to create folder: ${ JSON . stringify ( res . data ) } ` ,
121
+ ) ;
122
+ }
123
+ // Folder created successfully
124
+
109
125
const folder = res . data . folder ;
110
126
return {
111
127
content : [
You can’t perform that action at this time.
0 commit comments