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} {#if $store.error}
<InlineAlert <InlineAlert
type="error" type="error"
header={$store.error.title} header="Error fetching {tableType}"
message={$store.error.description} message={$store.error.description}
/> />
{/if} {/if}

View File

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