Skip to content

Commit

Permalink
Log the error detail to the console when importing fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnspurlock committed Jun 12, 2021
1 parent 333dad3 commit 92b8328
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function handleHtml(db: Database, url: URL): string | { redirectHref: string } |
let status = 0;
fetch('/', { method: 'POST', body: file, headers: { 'x-filename': file.name } }).then(v => { status = v.status; return v.json(); }).then(v => {
if (status !== 200) {
console.error('fetch failed', v.errorDetail);
header.textContent = v.error;
return;
}
Expand Down

0 comments on commit 92b8328

Please sign in to comment.