Implement helpful toString on client APIError

This commit is contained in:
Marshall Polaris 2022-07-07 15:05:42 -07:00
parent d9f42caa6a
commit 38edfcc13a

View File

@ -10,6 +10,9 @@ export class APIError extends Error {
this.name = 'APIError' this.name = 'APIError'
this.details = details this.details = details
} }
toString() {
return this.name
}
} }
export async function call(url: string, method: string, params: any) { export async function call(url: string, method: string, params: any) {