Errors on Offline app#973
Errors on Offline app#973seromenho wants to merge 1 commit intogetsentry:masterfrom seromenho:feat/offline-reporting
Conversation
new option allowOfflineStorage
|
Hey, so our feeling is that this should be a plugin, which we'd be happy to make happen by translating this patch to a plugin form. |
|
Hey, |
|
@seromenho still interested in tackling this issue? |
|
@kamilogorek yes. Let me know what I can do to help. |
|
Your implementation itself is very good, the thing that has to be done is extracting it to a separate file, wrapping it in exported function and hooking into Raven using The best implementation you can base on is React Native plugin https://github.com/getsentry/raven-js/blob/master/plugins/react-native.js as it shows how to add Also Let me know if you need any more pointers or feedback. Cheers! |
|
Closing this one. Followed suggestions and created a plugin from this. |
|
Is this plugin somewhere publicly available? |
This is my proposal to #279. Any thoughts/suggestions to improve or make it different are welcome.
Thanks.
Description
When calling
_makeRequest(or custom transport) set the onError function to store the event if we have the feature enabled.This means the feature can also be used on the custom transport if we use the passed
onError.The queue is processed once we initialise it or on the
onlineevent or a custom one set withonlineEventName.Processing the queue means call again
_sendProcessedPayloadwith the stored error data.New options
allowOfflineStorage- Booleanfalseby default.onlineEventName- Event name if you want to specify some other than theonline(default) to trigger the process queue while still on the app. Eg: You don't use some other event on your app to say you have connection.TODO
If this works for you I'm missing documentation and tests.