File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
apps/codingcatdev/scripts Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ ${content}`;
112112 // Get new devto url and update
113113 if ( response . status === 200 ) {
114114 const json = await response . json ( ) ;
115+ if ( json ?. errors ?. length ) {
116+ console . error ( JSON . stringify ( json . errors ) ) ;
117+ continue ;
118+ }
115119 console . log ( 'hashnode url' , json ?. data ?. createPublicationStory ?. post ?. slug ) ;
116120 const hashnodeSlug = json ?. data ?. createPublicationStory ?. post ?. slug ;
117121
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ for await (const file of g) {
5656 // TODO: We might need to add a check on cononical if this page is already in dev.to
5757 if (
5858 fm ?. slug &&
59+ fm . slug === 'angular-17-cypress-testing' &&
5960 fm ?. title &&
6061 fm ?. cover &&
6162 fm ?. published === 'published' &&
@@ -107,6 +108,11 @@ ${content}`;
107108 // Get new devto url and update
108109 if ( response . status === 200 ) {
109110 const json = await response . json ( ) ;
111+ if ( json ?. errors ?. length ) {
112+ console . error ( JSON . stringify ( json . errors ) ) ;
113+ continue ;
114+ }
115+
110116 console . log ( 'hashnode url' , json ?. data ?. createPublicationStory ?. post ?. slug ) ;
111117 const hashnodeSlug = json ?. data ?. createPublicationStory ?. post ?. slug ;
112118
You can’t perform that action at this time.
0 commit comments