File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,11 +2,17 @@ import 'dotenv/config';
22import { v7 } from 'css-authn' ;
33import { fetchList } from './main.js' ;
44
5- const authenticatedFetch = await v7 . getAuthenticatedFetch ( {
6- email : process . env . SOLID_EMAIL ,
7- password : process . env . SOLID_PASSWORD ,
8- provider : process . env . SOLID_SERVER ,
9- } ) ;
5+ let authenticatedFetch : Awaited < ReturnType < typeof v7 . getAuthenticatedFetch > > ;
6+
7+ try {
8+ authenticatedFetch = await v7 . getAuthenticatedFetch ( {
9+ email : process . env . SOLID_EMAIL ,
10+ password : process . env . SOLID_PASSWORD ,
11+ provider : process . env . SOLID_SERVER ,
12+ } ) ;
13+ } catch ( e ) {
14+ console . log ( 'Could not connect to your pod' ) ;
15+ }
1016const listUrl = 'https://michielbdejong.solidcommunity.net/movies/' ;
1117const interpretation = await fetchList ( listUrl , authenticatedFetch ) ;
1218interpretation . listings . forEach ( listing => console . log ( listing ) ) ;
You can’t perform that action at this time.
0 commit comments