We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42decf6 commit f3897c9Copy full SHA for f3897c9
src/schemas/index.js
@@ -9,7 +9,8 @@ const validateGithubOrg = (data) => {
9
const validate = ajv.compile(githubOrganizationSchema)
10
const valid = validate(data)
11
if (!valid) {
12
- throw new Error(validate.errors.map((error) => error.message).join('\n'))
+ const readableErrors = validate.errors.map((error) => `[ERROR: ${error.keyword}]${error.schemaPath}: ${error.message}`).join('\n')
13
+ throw new Error(`Error when validating the Github org response from API: ${readableErrors}`)
14
}
15
return null
16
0 commit comments