We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5f765d commit 30bd444Copy full SHA for 30bd444
README.md
@@ -103,7 +103,7 @@ npm run openapi-codegen
103
## Basic Usage
104
105
```ts
106
-import {PetStoreApiClient} from './petstore-api-client';
+import {PetStoreApiClient, PetStoreApiClientError} from './petstore-api-client';
107
108
const client = new PetStoreApiClient();
109
@@ -117,8 +117,8 @@ async function getPets() {
117
try {
118
await client.pet.addPet({/* pet data */});
119
} catch (error) {
120
- if (error instanceof client.HttpClientError) {
121
- console.error('API Error:', error.status, error.message);
+ if (error instanceof PetStoreApiClientError) {
+ console.error('API Error:', error.response.status, error.message);
122
}
123
124
```
0 commit comments