enzostvs HF Staff commited on
Commit
ed1d752
·
1 Parent(s): 4098b65
app/api/me/projects/[namespace]/[repoId]/route.ts CHANGED
@@ -109,7 +109,12 @@ export async function GET(
109
 
110
  for await (const fileInfo of listFiles({repo, accessToken: user.token as string})) {
111
  if (fileInfo.path.endsWith(".html") || fileInfo.path.endsWith(".css") || fileInfo.path.endsWith(".js") || fileInfo.path.endsWith(".json")) {
112
- const blob = await downloadFile({ repo, accessToken: user.token as string, path: fileInfo.path, raw: true });
 
 
 
 
 
113
  const html = await blob?.text();
114
  if (!html) {
115
  continue;
 
109
 
110
  for await (const fileInfo of listFiles({repo, accessToken: user.token as string})) {
111
  if (fileInfo.path.endsWith(".html") || fileInfo.path.endsWith(".css") || fileInfo.path.endsWith(".js") || fileInfo.path.endsWith(".json")) {
112
+ const blob = await downloadFile({ repo, accessToken: user.token as string, path: fileInfo.path, raw: true }).catch((error) => {
113
+ return null;
114
+ });
115
+ if (!blob) {
116
+ continue;
117
+ }
118
  const html = await blob?.text();
119
  if (!html) {
120
  continue;