Relays upload request errors via nsnotifications #1023
+35
−16
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 does this PR do?
Segment posts a notification if the segment request fails.
However, this notification doesn't say what the error is.
This PR relays the error information to that notification.
Where should the reviewer start?
Please take a look at the changes made in this function first
I've added
NSError * _Nullable error
to the completion handler block.Next, please take a look at the changes made in this function:
How should this be manually tested?
Use Charles Proxy or another tool to fail the /batch request with different response statuses.
Any background context you want to provide?
Sometimes, we're seeing the requests fail, but don't know why. Therefore, we are trying to add some logging to find out why these requests are failing.
What are the relevant tickets?
-none-
Screenshots or screencasts (if UI/UX change)
-none-
Questions: