@@ -361,7 +361,7 @@ private function createDiocesanCalendar(ResponseInterface $response): ResponseIn
361361 );
362362
363363 // Use raw payload for json_encode to preserve schema-compliant structure
364- $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
364+ $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
365365 if (
366366 false === file_put_contents (
367367 $ diocesanCalendarFile ,
@@ -447,7 +447,7 @@ private function createNationalCalendar(ResponseInterface $response): ResponseIn
447447 );
448448
449449 // Use raw payload for json_encode to preserve schema-compliant structure
450- $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
450+ $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
451451 if (
452452 false === file_put_contents (
453453 $ nationalCalendarFile ,
@@ -536,7 +536,7 @@ private function createWiderRegionCalendar(ResponseInterface $response): Respons
536536 );
537537
538538 // Use raw payload for json_encode to preserve schema-compliant structure
539- $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
539+ $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
540540 if (
541541 false === file_put_contents (
542542 $ widerRegionFile ,
@@ -654,7 +654,7 @@ private function updateNationalCalendar(ResponseInterface $response): ResponseIn
654654 }
655655
656656 // Use raw payload for json_encode to preserve schema-compliant structure
657- $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
657+ $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
658658 if (
659659 false === file_put_contents (
660660 $ calendarFile ,
@@ -747,7 +747,7 @@ private function updateWiderRegionCalendar(ResponseInterface $response): Respons
747747 }
748748
749749 // Use raw payload for json_encode to preserve schema-compliant structure
750- $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
750+ $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
751751 if (
752752 false === file_put_contents (
753753 $ widerRegionFile ,
@@ -838,7 +838,7 @@ private function updateDiocesanCalendar(ResponseInterface $response): ResponseIn
838838 }
839839
840840 // Use raw payload for json_encode to preserve schema-compliant structure
841- $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
841+ $ calendarData = json_encode ($ rawPayload , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
842842 if (
843843 false === file_put_contents (
844844 $ DiocesanCalendarFile ,
@@ -1095,7 +1095,7 @@ private function writeI18nFiles(\stdClass $rawPayload, JsonData $i18nFileEnum, a
10951095 if (
10961096 false === file_put_contents (
10971097 $ i18nFile ,
1098- json_encode ($ litCalEventsI18n , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ) . PHP_EOL
1098+ json_encode ($ litCalEventsI18n , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR ) . PHP_EOL
10991099 )
11001100 ) {
11011101 throw new ServiceUnavailableException ("Failed to write to file {$ i18nFile }" );
@@ -1155,7 +1155,7 @@ private function updateI18nFiles(
11551155 );
11561156 }
11571157
1158- $ i18nContent = json_encode ($ i18nData , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
1158+ $ i18nContent = json_encode ($ i18nData , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR );
11591159 if (false === file_put_contents ($ i18nFile , $ i18nContent . PHP_EOL )) {
11601160 throw new ServiceUnavailableException (
11611161 "Could not update {$ resourceDescription } i18n resource at {$ i18nFile }. "
0 commit comments