From ba9461c2afe7b35432bf57baa108357b913863c8 Mon Sep 17 00:00:00 2001 From: Jaime Rios Date: Mon, 18 Sep 2023 10:55:59 -0600 Subject: [PATCH] Update services.md (#9189) I've removed duplicated code --- docs/docs/services.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/docs/services.md b/docs/docs/services.md index 3301a7719d81..2bc7feb98cd0 100644 --- a/docs/docs/services.md +++ b/docs/docs/services.md @@ -626,12 +626,6 @@ validateWithSync(() => { throw "You'll have to be more creative than that" } }) - -validateWithSync(() => { - if (input.name === 'Name') { - throw new Error("You'll have to be more creative than that") - } -}) ``` Either of these errors will be caught and re-thrown as a `ServiceValidationError` with your text as the `message` of the error (although technically you should always throw errors with `new Error()` like in the second example).