diff --git a/services/base.js b/services/base.js index b74feff49a..a3f61b71c2 100644 --- a/services/base.js +++ b/services/base.js @@ -127,6 +127,12 @@ class BaseService { } is missing required previewUrl or staticExample` ) } + if (staticExample && !urlPattern) { + throw new Error('Must declare a urlPattern if using staticExample') + } + if (staticExample && !exampleUrl) { + throw new Error('Must declare an exampleUrl if using staticExample') + } const stringified = queryString.stringify(query) const suffix = stringified ? `?${stringified}` : ''