Skip to content

Commit 6cb14df

Browse files
authored
Update async-example.md
1 parent 95dab65 commit 6cb14df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/async-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ let api = new Api({
3333
```
3434

3535
```js
36-
require('error-object-polyfill');
3736
class ModelValidator {
3837
constructor() {
3938
this.validator = null;
@@ -81,6 +80,7 @@ class ModelValidator {
8180
try {
8281
await this.validationAsync;
8382
} catch (error) {
83+
require('error-object-polyfill');
8484
throw Error.create({ title: `InvalidRequest: ${error.message}.` }, 'InvalidInputRequest);
8585
}
8686
}

0 commit comments

Comments
 (0)