Description
Currently it's not so easy to debug when something fails.
@seletz added a JasonLogAction so we can call actions like "type": "$log.debug" to see things on the XCode console, and I think that's a great first step.
But still it's hard to debug things when something goes wrong. I can think of a couple of solutions.
One is, maybe implement some sort of JasonAnalyticsAction, which can send messages to whichever analytics service users want specify (like Heap, Sentry, Mixpanel, Google Analytics, etc)
Example:
{
"type": "$network.request",
"options": {
"url": "...",
"method": "post"
},
"success": {
"type": "$render"
},
"error": {
"type": "$analytics.send",
"options": {
"provider": "mixpanel",
"data": {
"message": "{{$jason}}"
}
}
}
}
In order for this to be possible, we need to:
- Update existing error actions to return meaningful messages.
- Write a new analytics class to handle them.
Or another option would be we could create a separate extension class to handle each analytics service.
But anyway, there can be other ways to do this, so feel free to make suggestions. This is really a pain point for a lot of people (especially the people who normally don't use XCode much) and even myself because it's such a hassle to step through each line and find out what's going on.