Skip to content

Commit 30bd444

Browse files
committed
chore: fix example in documentation
1 parent c5f765d commit 30bd444

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ npm run openapi-codegen
103103
## Basic Usage
104104

105105
```ts
106-
import {PetStoreApiClient} from './petstore-api-client';
106+
import {PetStoreApiClient, PetStoreApiClientError} from './petstore-api-client';
107107

108108
const client = new PetStoreApiClient();
109109

@@ -117,8 +117,8 @@ async function getPets() {
117117
try {
118118
await client.pet.addPet({/* pet data */});
119119
} catch (error) {
120-
if (error instanceof client.HttpClientError) {
121-
console.error('API Error:', error.status, error.message);
120+
if (error instanceof PetStoreApiClientError) {
121+
console.error('API Error:', error.response.status, error.message);
122122
}
123123
}
124124
```

0 commit comments

Comments
 (0)