Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli][build-utils] Refactor ajv error message #4705

Merged
merged 3 commits into from
Jun 24, 2020
Merged

[cli][build-utils] Refactor ajv error message #4705

merged 3 commits into from
Jun 24, 2020

Conversation

styfle
Copy link
Member

@styfle styfle commented Jun 23, 2020

This PR is a follow up to #4694 so we can use this same helper function in the API.

I tried to follow the existing error message format so that the API can use a different prefix than the CLI.

The API currently returns a 400 with Invalid request when a Git deploy fails validation:

api-comment

error.message,
'Invalid vercel.json - property `routes` should be of type array.'
);
t.deepEqual(error.message, 'Invalid vercel.json - `routes` should be array.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these "should be" errors would read better to me if we prefixed "a"/"an" before the type. i.e. "should be an array".

@kodiakhq kodiakhq bot merged commit 9af3938 into master Jun 24, 2020
@kodiakhq kodiakhq bot deleted the ch3114/utils branch June 24, 2020 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants