File tree Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ export default (): AstroIntegration => ({
1414 let url ! : URL
1515 try {
1616 url = new URL ( database . Cover . Url )
17- } catch ( err ) {
18- console . log ( 'Invalid Cover image URL' )
17+ } catch {
18+ console . log ( 'Invalid Cover image URL: ' , database . Cover ?. Url )
1919 return Promise . resolve ( )
2020 }
2121
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ export default (): AstroIntegration => ({
1717 let url ! : URL
1818 try {
1919 url = new URL ( icon . Url )
20- } catch ( err ) {
21- console . log ( 'Invalid Icon image URL' )
20+ } catch {
21+ console . log ( 'Invalid Icon image URL: ' , icon ?. Url )
2222 return Promise . resolve ( )
2323 }
2424
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ export default (): AstroIntegration => ({
1616 let url ! : URL
1717 try {
1818 url = new URL ( post . FeaturedImage . Url )
19- } catch ( err ) {
20- console . log ( 'Invalid FeaturedImage URL' )
19+ } catch {
20+ console . log ( 'Invalid FeaturedImage URL: ' , post . FeaturedImage ?. Url )
2121 return Promise . resolve ( )
2222 }
2323
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ if (database.Cover) {
3333 } else if (database .Cover .Type === ' file' ) {
3434 try {
3535 coverImageURL = filePath (new URL (database .Cover .Url ))
36- } catch ( err ) {
37- console .log (' Invalid DB cover image URL' )
36+ } catch {
37+ console .log (' Invalid DB cover image URL: ' , database . Cover ?. Url )
3838 }
3939 }
4040}
@@ -43,8 +43,8 @@ let customIconURL: string
4343if (database .Icon && database .Icon .Type === ' file' ) {
4444 try {
4545 customIconURL = filePath (new URL (database .Icon .Url ))
46- } catch ( err ) {
47- console .log (' Invalid DB custom icon URL' )
46+ } catch {
47+ console .log (' Invalid DB custom icon URL: ' , database . Icon ?. Url )
4848 }
4949}
5050---
Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ await Promise.all(
7373 let url! : URL
7474 try {
7575 url = new URL ((block .Image || block .File ).File .Url )
76- } catch ( err ) {
77- console .log (' Invalid file URL' )
76+ } catch {
77+ console .log (' Invalid file URL: ' , ( block . Image || block . File )?. File ?. Url )
7878 return Promise .reject ()
7979 }
8080 return Promise .resolve (url )
You can’t perform that action at this time.
0 commit comments