Don't use JSON.stringify for errors (#19)

* better error handling

* remove unneeded catch

* Update index.ts
This commit is contained in:
Thomas Boop
2022-06-22 09:20:48 -04:00
committed by GitHub
parent 5c6995dba1
commit 4307828719
5 changed files with 27 additions and 31 deletions

View File

@@ -49,7 +49,7 @@ export async function prepareJob(
createdPod = await createPod(container, services, args.registry)
} catch (err) {
await prunePods()
throw new Error(`failed to create job pod: ${JSON.stringify(err)}`)
throw new Error(`failed to create job pod: ${err}`)
}
if (!createdPod?.metadata?.name) {