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

Fix error message for non-existent post #501

Merged
merged 2 commits into from Aug 25, 2018

Conversation

chriszarate
Copy link
Collaborator

@chriszarate chriszarate commented Aug 25, 2018

What does this implement/fix? Explain your changes.

Fixes a grammatical error in an error message that has been bugging me for a long time. 😂

It's worth noting that this is actually a breaking change for us! This error corresponds to a 404 response for us on the client. But because this is a error and not an empty response, we have to catch all errors and inspect them in order to determine whether we should 404. The only way to do this is to regex the string, making it a bit fragile.

Have we considered implementing error codes (either on the error object or leading the message)?

Any other comments?

Added test, which would at least catch future changes to the message.

@jasonbahl
Copy link
Collaborator

@chriszarate Thanks!

@jasonbahl jasonbahl merged commit f0400a7 into wp-graphql:develop Aug 25, 2018
@jasonbahl jasonbahl mentioned this pull request Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants