Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Map 422 Unprocessable Entity to INVALID_ARGUMENT #1149

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

lwc
Copy link
Contributor

@lwc lwc commented Jul 2, 2019

GraphQL prefers to use 422 Unprocessable Entity when malformed queries are made to a server.

We're using this library to collect and send traces to our APM provider and their OC exporter has a mapping of TraceStatus -> client/server errors. Currently 422 gets lumped into UNKNOWN, which is tracked as a server error.

This change maps 422 to INVALID_ARGUMENT, so garbage posted on our graphql endpoint doesn't wake us up! :)

@lwc lwc requested review from rakyll, rghetia and a team as code owners July 2, 2019 01:13
@songy23 songy23 merged commit 19a9151 into census-instrumentation:master Jul 2, 2019
@lwc lwc deleted the map-http-422 branch July 3, 2019 03:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants