-
Notifications
You must be signed in to change notification settings - Fork 7
Occasional Branch error on deep link creation #8
Comments
@dustinkerstein Sorry for the long delay in replying. Do you still experience this error? It looks like the API is returning 204, which is technically success, but the gem is treating it like an error and possibly not handing things well. |
@jdee no worries at all. Yeah, I am still seeing this occasionally. Any ideas on how to tackle? Thanks! |
@dustinkerstein I can see something you can try. In your code, where you have logger.error "Error creating URLs: #{res.error}" That should give you more information. The API can return a mixed result of successes and failures: https://help.branch.io/developers-hub/docs/deep-linking-api#sample-response---bulk-create. The BulkUrlsResponse handles that, but you don't get a BulkUrlsResponse unless HTTParty reports success. https://github.com/ushu/branch_io/blob/master/lib/branch_io/client/links.rb#L57. You could even do something like: error_message = case res
when BulkUrlsResponse
res.errors.join(',')
else
res.error
end
logger.error "Error creating URLs: #{error_message}" That should at least let the error message come through. I'm not sure what is causing the 204 or why this is being treated as an error. That determination seems to come from |
One more thought is that if you're only creating two links at a time, try this: res1 = client.link(url_configs[0])
res2 = client.link(url_configs[1]) |
@jdee Thanks! I'll take that for a spin. New code looks like:
|
I got this error:
On this line:
I'll need to look the syntax for accessing that json. For now though, I'll just implement your other recommended logging (which works great). Thanks! |
I don't have a good grasp on what is happening, but occasionally my Rails new user signup flow breaks on what appears to be a
branch_io
error. Here's the error I am receiving. Note I am using theomniauth-google-oauth2
gem:Here's my
branch_io
related Ruby code:Can you see what could be going on? I'm probably not handling potential errors correctly (as it breaks my entire signup flow when this happens), but any help you can provide would be greatly appreciated. Note I am using the 0.2.0 version of
branch_io
- Please let me know if I can get you any further info or debug. Thanks!The text was updated successfully, but these errors were encountered: