Correct error message to say sheets when it's a Google sheet.

This commit is contained in:
Sam Rose 2023-10-16 17:11:51 +01:00
parent b7ff1d60f1
commit 39292e88a8
2 changed files with 2 additions and 6 deletions

View File

@ -57,7 +57,7 @@
{#if $store.error}
<InlineAlert
type="error"
header={$store.error.title}
header="Error fetching {tableType}"
message={$store.error.description}
/>
{/if}

View File

@ -11,15 +11,11 @@ import { TableNames } from "constants"
class TableImportError extends Error {
constructor(errors) {
super(`Error importing tables: ${Object.keys(errors).join(", ")}`)
super()
this.name = "TableImportError"
this.errors = errors
}
get title() {
return `Error fetching tables`
}
get description() {
let message = ""
for (const key in this.errors) {