Use try…catch anywhere you use await

Using a client

From ./examples/errors.test-d.ts#13~20

      const client = HypothesisRestClient({ apiKey: YOUR_API_KEY })
try {
await client.annotations.createAnnotation(NEW_ANNOTATION)
} catch (ex) {
console.error(ex)
}

Clientless

From ./examples/errors.test-d.ts#23~29

      try {
await createAnnotation(apiKeyConnectionOptions, NEW_ANNOTATION)
} catch (ex) {
console.error(ex)
}

Generated using TypeDoc