diff --git a/src/validate-open-rpc-document.ts b/src/validate-open-rpc-document.ts index 2ef65d17..7a31d911 100644 --- a/src/validate-open-rpc-document.ts +++ b/src/validate-open-rpc-document.ts @@ -37,15 +37,11 @@ export class OpenRPCDocumentValidationError implements Error { * * import { validateOpenRPCDocument } from "@open-rpc/schema-utils-js"; * const badOpenRPCDocument = {} as any; - * try { - * const isValid = validateOpenRPCDocument(badOpenRPCDocument); - * if (isValid) { - * // handle validity - * } - * } catch (error) { - * // handle error + * + * const result = validateOpenRPCDocument(badOpenRPCDocument); + * if (result !== true) { + * console.error({ error: result }) * } - * ``` * */