-
Notifications
You must be signed in to change notification settings - Fork 160
RUM-12441 Graphql errors #2552
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
Open
barboraplasovska
wants to merge
4
commits into
develop
Choose a base branch
from
bplasovska/RUM-12441/graphql-errors
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
RUM-12441 Graphql errors #2552
+466
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2917f4b to
85a1acc
Compare
This comment has been minimized.
This comment has been minimized.
0381249 to
881b167
Compare
35f7626 to
3fc640f
Compare
barboraplasovska
commented
Nov 3, 2025
Comment on lines
+12
to
+25
| // Extension to make Path conform to Equatable for testing | ||
| extension RUMResourceEvent.Resource.Graphql.Errors.Path: Equatable { | ||
| public static func == (lhs: RUMResourceEvent.Resource.Graphql.Errors.Path, rhs: RUMResourceEvent.Resource.Graphql.Errors.Path) -> Bool { | ||
| switch (lhs, rhs) { | ||
| case (.string(let lhsValue), .string(let rhsValue)): | ||
| return lhsValue == rhsValue | ||
| case (.integer(let lhsValue), .integer(let rhsValue)): | ||
| return lhsValue == rhsValue | ||
| default: | ||
| return false | ||
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this extension to be able to do XCTAssertEqual on a Path. Not sure if there is a better way to make this testable.
git-thuerk-done
approved these changes
Nov 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What and why?
GraphQL APIs follow a different error model than REST APIs, they return HTTP
200 OKstatus codes even when operations fail with errors included in the response body under anerrorskey. Without parsing the response body, these errors would go unnoticed in RUM monitoring.This PR adds support for automatically detecting, parsing, and reporting GraphQL errors in RUM resource events. When a GraphQL request completes with errors in the response, the SDK now captures and includes them in the resource event.
How?
When a request completes with a JSON response, we check for the presence of an
errorskey. If found, the response body is passed along to the resource scope where it's decoded according to the GraphQL spec and populated into the resource event'sgraphql.errorsarray andgraphql.errorCountfields. (cc PR onrum_events_format).Review checklist
make api-surface)