File tree Expand file tree Collapse file tree
EssentialCSharp.Web/wwwroot/js Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,12 @@ function loadRunnableListings() {
5858
5959 _runnableListingsPromise = fetch ( '/js/chapter-listings.json' )
6060 . then ( res => {
61- if ( ! res . ok ) throw new Error ( `Failed to load chapter-listings.json: ${ res . status } ` ) ;
61+ if ( ! res . ok ) {
62+ const msg = res . status === 404
63+ ? 'chapter-listings.json not found (404). The NuGet content package may not be restored — Run buttons will not be shown.'
64+ : `Failed to load chapter-listings.json: ${ res . status } ` ;
65+ throw new Error ( msg ) ;
66+ }
6267 return res . json ( ) ;
6368 } )
6469 . then ( data => {
@@ -81,6 +86,7 @@ function loadRunnableListings() {
8186 } )
8287 . catch ( err => {
8388 console . warn ( 'Could not load runnable listings:' , err ) ;
89+ _runnableListingsPromise = null ; // Allow retry on next call (e.g. transient network error)
8490 return new Set ( ) ; // graceful degradation — no Run buttons
8591 } ) ;
8692
You can’t perform that action at this time.
0 commit comments