-
Notifications
You must be signed in to change notification settings - Fork 331
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
[Diagnostics] Add backend_error_code
property
#4236
Conversation
backend_error_code
property
892222e
to
4b48f46
Compare
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.
Looks good!
resultOrigin: response.origin, | ||
verificationResult: verificationResult) | ||
case let .failure(error): | ||
var responseCode = -1 | ||
if case let .errorResponse(_, code, _) = error { | ||
var backendErrorCode: Int? |
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 like using nil
to represent the absence of a value (as this new code does), but we now seem to be mixing conventions now for "empty": -1
for responseCode
and nil
for backendErrorCode
. Not necessarily recommending a change here, but just surfacing this in case it hadn't been considered.
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.
That's a good point... And yeah, I also prefer to send nil for these cases... I think it's something that can be changed separately to avoid changing the data we send though. Good callout!
**This is an automatic release.** ### Bugfixes * [Customer Center] Build `WrongPlatformView` from JSON (#4234) via Cesar de la Vega (@vegaro) * Add `feedbackSurveyCompleted` event to Customer Center events (#4194) via Cesar de la Vega (@vegaro) ### Other Changes * [Diagnostics] Add `backend_error_code` property (#4236) via Toni Rico (@tonidero) * Update README.md (#3986) via Khoa (@onmyway133)
<!-- Thank you for contributing to Purchases! Before pressing the "Create Pull Request" button, please provide the following: --> ### Checklist - [ ] If applicable, unit tests - [ ] If applicable, create follow-up issues for `purchases-android` and hybrids ### Motivation <!-- Why is this change required? What problem does it solve? --> <!-- Please link to issues following this format: Resolves #999999 --> ### Description This adds the `backend_error_code` property to diagnostics `http_request_performed` events.
**This is an automatic release.** ### Bugfixes * [Customer Center] Build `WrongPlatformView` from JSON (#4234) via Cesar de la Vega (@vegaro) * Add `feedbackSurveyCompleted` event to Customer Center events (#4194) via Cesar de la Vega (@vegaro) ### Other Changes * [Diagnostics] Add `backend_error_code` property (#4236) via Toni Rico (@tonidero) * Update README.md (#3986) via Khoa (@onmyway133)
Checklist
purchases-android
and hybridsMotivation
Description
This adds the
backend_error_code
property to diagnosticshttp_request_performed
events.