From 38edfcc13ae19afad06534e3424bd3b03a0d3cf1 Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Thu, 7 Jul 2022 15:05:42 -0700 Subject: [PATCH] Implement helpful `toString` on client `APIError` --- web/lib/firebase/api-call.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/lib/firebase/api-call.ts b/web/lib/firebase/api-call.ts index d169ea72..c39ef4c9 100644 --- a/web/lib/firebase/api-call.ts +++ b/web/lib/firebase/api-call.ts @@ -10,6 +10,9 @@ export class APIError extends Error { this.name = 'APIError' this.details = details } + toString() { + return this.name + } } export async function call(url: string, method: string, params: any) {