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

Map 422 Unprocessable Entity to INVALID_ARGUMENT#1149

Merged
songy23 merged 1 commit intocensus-instrumentation:masterfrom
lwc:map-http-422
Jul 2, 2019
Merged

Map 422 Unprocessable Entity to INVALID_ARGUMENT#1149
songy23 merged 1 commit intocensus-instrumentation:masterfrom
lwc:map-http-422

Conversation

@lwc
Copy link
Copy Markdown
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 a team, rakyll and rghetia 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.

4 participants